Hi guys:
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
browser = webdriver.Firefox()
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
browser = webdriver.Firefox()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 61, in __init__
self.binary, timeout),
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 47, in __init__
self.binary.launch_browser(self.profile)
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 50, in launch_browser
self._start_from_profile_path(self.profile.path)
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 73, in _start_from_profile_path
env=self._firefox_env).communicate()
File "C:\Python27\lib\subprocess.py", line 679, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
startupinfo)
WindowsError: [Error 87] The parameter is incorrect
When I was first trying to install selenium-server-standalone-2.28.0.jar, the process seemed to get stuck at "14:37:36.630 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@4fc5a2 f9". But later when I re-ran the command "java -jar selenium-server-standalone-2.28.0.jar" , it says"Selenium is already running on port 4444", so I assume that the first installation somehow got through. Is it an installation problem? Any help is appreciated! I'm using windows 7, 64
$ java -jar selenium-server-standalone-2.28.0.jar
Aug 03, 2013 2:37:36 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
14:37:36.505 INFO - Java: Oracle Corporation 23.7-b01
14:37:36.506 INFO - OS: Windows 7 6.1 amd64
14:37:36.514 INFO - v2.28.0, with Core v2.28.0. Built from revision 18309
14:37:36.606 INFO - RemoteWebDriver instances should connect to:
http://127.0.0. 1:4444/wd/hub
14:37:36.607 INFO - Version Jetty/5.1.x
14:37:36.608 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
14:37:36.608 INFO - Started HttpContext[/selenium-server,/selenium-server]
14:37:36.608 INFO - Started HttpContext[/,/]
14:37:36.630 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@4fc5a2f9
14:37:36.630 INFO - Started HttpContext[/wd,/wd]
Exception in thread "main" java.net.BindException: Selenium is already running on port 4444. Or some other service is.
at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:472)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:280)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:243)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:54)