2
votes

I've configured the Selenium 2.0 IDE in Firefox and I execute my Project using this IDE.

  1. Execute the Project using IDE.
  2. And i Play back the executed screens.
  3. Saved those Test case in HTML and Java format. (For Java: I used Jnit/Webdriver)
  4. Then i open the java file using eclipse to change for Chrome Driver
  5. After that i append this code into that System.setProperty();
  6. Then i executed the Chromewebdriver using Command Prompt java -Dwebdriver.chrome.driver=/path/to/chromedriver -jar selenium-server-standalone-2.7.0.jar
  7. Then i got the error as
C:\Program Files\Java\jdk1.6.0\bin>java -Dwebdriver.chrome.driver=c:/Users/FSP/D
ownloads/chromedriver.exe -jar selenium-server-standalone-2.39.0.jar
Unable to access jarfile selenium-server-standalone-2.39.0.jar
C:\Program Files\Java\jdk1.6.0\bin>java -Dwebdriver.chrome.driver=c:/Users/FSP/D
ownloads/chromedriver.exe -jar c:/Users/FSP/Downloads/selenium-server-standalone
-2.39.0.jar
Feb 22, 2014 6:48:37 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
18:48:39.395 INFO - Java: Sun Microsystems Inc. 1.6.0-b105
18:48:39.405 INFO - OS: Windows Vista 6.1 x86
18:48:39.618 INFO - v2.39.0, with Core v2.39.0. Built from revision ff23eac
18:48:40.440 INFO - Default driver org.openqa.selenium.iphone.IPhoneDriver regis
tration is skipped: registration capabilities Capabilities [{platform=MAC, brows
erName=iPhone, version=}] does not match with current platform: VISTA
18:48:40.500 INFO - Default driver org.openqa.selenium.iphone.IPhoneDriver regis
tration is skipped: registration capabilities Capabilities [{platform=MAC, brows
erName=iPad, version=}] does not match with current platform: VISTA
18:48:41.089 INFO - RemoteWebDriver instances should connect to: 
18:48:41.091 INFO - Version Jetty/5.1.x
18:48:41.122 INFO - Started HttpContext[/selenium-server/driver,/selenium-server
/driver]
18:48:41.124 INFO - Started HttpContext[/selenium-server,/selenium-server]
18:48:41.125 INFO - Started HttpContext[/,/]
18:48:41.772 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@1db4f6
f
18:48:41.772 INFO - Started HttpContext[/wd,/wd]
18:48:41.799 WARN - Failed to start: [email protected]:4444
Exception in thread "main" org.openqa.jetty.util.MultiException[java.net.SocketE
xception: Unrecognized Windows Sockets error: 0: JVM_Bind]
        at org.openqa.jetty.http.HttpServer.doStart(HttpServer.java:696)
        at org.openqa.jetty.util.Container.start(Container.java:72)
        at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:4
88)
        at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:30
0)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:24
5)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:96)
java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at org.openqa.jetty.util.ThreadedServe`enter code here`r.newServerSocket(ThreadedServer.j
ava:392)
at org.openqa.jetty.util.ThreadedServer.open(ThreadedServer.java:478)
at org.openqa.jetty.util.ThreadedServer.start(ThreadedServer.java:504)
at org.openqa.jetty.http.SocketListener.start(SocketListener.java:202)
at org.openqa.jetty.http.HttpServer.doStart(HttpServer.java:726)
at org.openqa.jetty.util.Container.start(Container.java:72)
at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:4
88)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:30
0)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:24
5)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:96)
C:\Program Files\Java\jdk1.6.0\bin>

How to solve this? So please try to configure and run the script through other browsers using webdriver concept.

1
The first line of the error message is pretty clear: selenium-server-standalone-2.39.0.jar is not found. In your script I notice that you precede this with "/path/to/" -- in the instructions, this means that you need to supply the path yourself. Wherever you put the jar file has to be identified by its path. - Bob Dalgleish

1 Answers

0
votes

It might be classpath issue....

Download the latest version of selenium, say 2.39.0 from the seleniumHQ.org site.

Place it in C:\ drive. Goto the environment variables and add java -jar selenium-server-standalone-2.39.0.jar to the classpath