Opera Mobile Emulator testing with Selenium WebDriver

Opera Mobile Emulator

OperaDriver has recently been updated to support running Selenium tests on the Opera Mobile Emulator.
The update will land in Selenium 2.26, but we couldn’t wait and decided to already add it to our Selenium Grid.

By specifying some desired capabilities, you can run your tests on a specific emulated device.
You can change the resolution of the screen, the pixel density and the UI.
Here’s an example where we run a test on the tablet UI with a 800×600 display:

caps = {
  :browserName => "operea",
  :platform => "LINUX",
  'opera.product' => 'mobile',
  'opera.arguments => '-tabletui -displaysize 860x600'
}

urlhub = "http://key:secret@hub.testingbot.com:4444/wd/hub"
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120
@webdriver = Selenium::WebDriver.for :remote,:url => urlhub , :desired_capabilities => caps,:http_client => client
@webdriver.navigate.to "http://testingbot.com"
puts @webdriver.title
@webdriver.quit

Right now Opera Mobile support is still robust and in need for some (minor) tweaks, but we think it’s starting to look good.
If you want to give it a try, you can run the example on our grid.

Interested in running tests on other mobile devices? Check out our supported emulators (iPhone/iPad/Android) on our mobile page.

More information about OperaDriver and its emulator is available on: [dev.opera.com] Introducing mobile browser automation and [github.com] OperaDriver

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *