Skip to content

October 21, 2011

Chrome Integration

by lvendramini

Currently Selenium version 2.0 has issues with it’s tabbing when used with firefox.  When tabbing, the focus is not changing.  However, this is not an issue with Google Chrome.  To get around this issue using firefox developers are forced to change the focus on the page by clicking on a different element on the page.  This adds more code to webtests and does not mimic the normal human interactions on a page, which webtests are made to do.

To Setup Webtests

1) You must have Chrome version 12.0.712.0 or newer.

2) Download the binary chromedriver (http://code.google.com/p/chromium/downloads/list)

Macs – http://code.google.com/p/chromium/downloads/detail?name=chromedriver_mac_16.0.902.0.zip&can=2&q=
Windows – http://code.google.com/p/chromium/downloads/detail?name=chromedriver_win_16.0.902.0.zip&can=2&q=
Linux 64 bit –  http://code.google.com/p/chromium/downloads/detail?name=chromedriver_linux64_16.0.902.0.zip&can=2&q=
Linux 32 bit – http://code.google.com/p/chromium/downloads/detail?name=chromedriver_linux32_16.0.902.0.zip&can=2&q=

3) Unzip the file and place it in the user’s bin directory  (e.g. in the /usr/bin directory).

4) on the command line add the parameter -Dwebdriver.driver=chrome

ie mvn test -Dwebdriver.driver=chrome -Deasyb.test=none

To Run Webtests Via IntelliJ

1) Go to the Run/Debug Configuration settings for your test or package

2) Under VM Parameters enter -Dwebdriver.driver=chrome

Configuration Settings

Additional reading:  http://code.google.com/p/selenium/wiki/ChromeDriver

Advertisements
Read more from Tips and Tricks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments

%d bloggers like this: