3

I am automating some tests a real device (iOS) using Appium and Cucumber. My idea it to do the following steps:

  • Open the app
  • Do some tasks
  • Launch Safari
  • Navigate to a website, lets say google.com for example

My approach is the following:

  • I create the Driver with my app capabilities
  • Do what I need
  • Clear the Driver
  • Create a new driver with Safari capabilities
  • Navigate to www.google.com

The code looks something like this:

Appium::Driver.new(app_capabilities, true)
# do what I need on the app
driver.driver_quit

Appium::Driver.new(browser_capabilities, true)
# do what I need on the browser
driver.driver_quit

The problem I am having is that Safari doesn't launch. Although if I use only one Driver with the browser capabilities it does launch.

Anyone has any idea this is happening? Or maybe a better strategy?

I'm writing ruby but I don't mind code in other languages.

0

You can just get chrome to run as if it's on iPhone , this is easier than driving the browser on the phone. http://sites.google.com/a/chromium.org/chromedriver/mobile-emulation

Thisight not be suitable for everything but it's fine for reasonably simple usages and works for other devices not just iPhones.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.