Selenium 2.25.0 / Windows 8 / IE 10 / Maven – Example

Posted on Updated on

Get it here: https://github.com/jamsyoung/selenium-ie10-example

This is just an example of how to create a simple selenium 2.x script that will run on Windows 8 in IE 10 via Maven.

Requirements

Tips

  • Use the Windows PowerShell, not the typical shell that ‘cmd’ launches
  • If you are running Windows 8 in a VM, or just don’t like Eclipse, use Sublime Text – http://www.sublimetext.com

How to Run

  • In a Windows PowerShell run the following command in the selenium-ie10-example folder. (The directory with the pom.xml file)
      mvn clean integration-test
    
  • Or run the execute.bat file, which does the exact same thing.

Example Output

Maven spits out lots of stuff, especially the first time you run it. The TESTS section is what you want to pay attention to. That said, ignore all the errors that the driver dumps in there when it is starting up.

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running testcases.SeleniumTest
The path to the driver executable must be set by the webdriver.ie.driver system property; for more information, see
http://code.google.com/p/selenium/wiki/InternetExplorerDriver. The latest version can be downloaded from

http://code.google.com/p/selenium/downloads/list

Aug 31, 2012 10:08:59 PM org.openqa.selenium.ie.InternetExplorerDriverServer initializeLib
WARNING: This method of starting the IE driver is deprecated and will be removed in selenium 2.26. Please download the
IEDriverServer.exe from http://code.google.com/p/selenium/downloads/list and ensure that it is in your PATH.
Aug 31, 2012 10:09:01 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (org.apache.http.NoHttpResponseException) caught when processing request: The target server failed to respond
Aug 31, 2012 10:09:01 PM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
page 0 load time: 4.119
page 1 load time: 3.477
page 2 load time: 3.799
  total page load time: 11.395
average page load time: 3.7983333333333333
     longest load time: 4.119
    shortest load time: 3.477
 empty cache load tiem: 4.119
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.629 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.035s
[INFO] Finished at: Fri Aug 31 22:09:14 PDT 2012
[INFO] Final Memory: 12M/31M
[INFO] ------------------------------------------------------------------------
About these ads

Leave a Reply

Please log in using one of these methods to post your comment:

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