Tag: "webdriver"

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

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

OS X Testing with Selenium WebDriver

Currently we are the only company providing OS X support to our customers.
When you run a test on one of our Mac nodes, we reserve a dedicated VM running OS X Lion on a beefy Mac Pro running VMWare.

These last few weeks, we’ve made quite a few optimizations on OS X to improve overall testing, here’s what we’ve done:

Added OS X Safari 6 with WebDriver

This week we’ve added Safari 6 Mac OS X to our list of supported browsers.
With 58 browser/OS combinations, we’ve got most of the combinations covered.

Next to Safari 6, we also provide Safari 5 on Mac OS X Lion and Windows.
Yesterday we have added support for our Tunnel to Safari WebDriver, which means you can now run tests against Safari 5 and Safari 6 from your local network.
Our Tunnel is now supported with all browser combinations, even with iPhone/iPad and Android emulators.

Improved iOS Testing

We’ve learned from extensive testing with the iOS simulator that the simulator sometimes acts strangely.
After a lot of debugging and fixing, we’ve come at a point where we think running tests on iOS is finally stable.

More browser combinations

You can now run tests with Firefox 3-14, Chrome, Opera and Safari 5+6 on a Lion instance.

Future optimisations

We’ll be upgrading our nodes to OS X Mountain Lion and add better Opera support in the next few weeks.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Webdriver Backed Selenium: use RC and WebDriver together

Today we have added full support for Webdriver-backed Selenium, which allows you to use the two API’s together in a single test.

By using this feature, it will be easier for you to migrate your existing Selenium RC tests to the new WebDriver format.
Here’s a list of reasons on why you should consider start using WebDriver:

  • Better and more consistent API
  • Improved emulation of user interactions. WebDriver uses native events in order to interact with a web page, where possible.
  • Support by the major browser vendors. Chrome, FireFox and Opera are all active contributors in WebDriver’s development
  • Faster, less error-prone tests
  • Even though not all RC commands are supported, you can now run most of your RC tests on a WebDriver instance inside our grid.
    An example of using the two API’s together in Ruby would be:

    #!/usr/bin/env ruby
    
    require "rubygems"
    require 'testingbot' 
    gem "selenium-client"
    gem "selenium-webdriver"
    require "selenium-webdriver" 
    require "selenium/client"
    
    selenium = Selenium::Client::Driver.new :host    => "hub.testingbot.com",
                                            :port    => 4444,
                                            :url     => "https://www.facebook.com",
                                            :browser => "*webdriver"
                                            
    caps = {
      :browserName => "iexplore",
      :platform => "WINDOWS"
    }
    urlhub = "http://API_KEY:API_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
    selenium.start :driver => @webdriver
    puts @webdriver.title == selenium.title # WebDriver and RC together
    selenium.open "/" # RC
    @webdriver.quit # WebDriver
    

    This test will show up in our member area with screenshots/video and a list of steps from both RC and WebDriver.

    VN:F [1.9.22_1171]
    Rating: 0.0/10 (0 votes cast)
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

iPhone and iPad Selenium Testing with Webdriver

Since our last post announcing Mac OS X Selenium support, we now have added iPhone and iPad to the mix.

You can now run your Selenium webdriver tests on iPad and iPhone (iOS 5.1) inside our grid.
Testing on iPad and iPhone happens with the official iOS Simulator from Apple and comes with a video and screenshots of the test.

At TestingBot we understand that mobile testing is becoming increasingly important, so that’s why we are dedicated to provide you with the best solutions for mobile Selenium testing.

A simple example of how to run your first test on TestingBot:

require "rubygems"
require 'testingbot'
gem "selenium-client"
gem "selenium-webdriver"
require "selenium-webdriver"
require "selenium/client"

caps = {
  :browserName => "iphone", # or ipad
  :platform => "MAC"
}
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 "https://www.google.com/"
puts webdriver.title
webdriver.quit

You can find more info about our iOS and Android support in our mobile support area.

We look forward to your comments and suggestions.

VN:F [1.9.22_1171]
Rating: 7.8/10 (9 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Mac OS X Selenium testing. Webdriver and Selenium RC testing with Apple.

We will make a lot of people happy with this announcement: today we start providing our customers with Mac OS X testing on-demand.
Next to testing on Windows (2008/2003), Linux and Android we now finally provide testing on Apple’s OS.

We provide a video and screenshots of your test running on OS X, just like we do with all the other platforms we support.
An example in Ruby of running a test on the mac would be:

require "rubygems"
require 'testingbot' 
gem "selenium-client"
gem "selenium-webdriver"
require "selenium-webdriver" 
require "selenium/client"

caps = {
  :browserName => "firefox",
  :platform => "MAC"
}
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://www.testingbot.com/"
puts webdriver.title
webdriver.quit

The browsers we currently support on MAC are:

  • Firefox 11
  • Safari 5
  • Google Chrome

List of all browsers/OS versions we support: browsers

OS X testing is available in beta to our customers (excluding free trials). Enjoy!

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)