Running a Selenium 2 RemoteWebDriver server using java -jar selenium-server-standalone-2.15.0.jar
.
I always get the error:
HTTP ERROR: 403
Forbidden for Proxy
RequestURI=/session
when connecting to it using the python WebDriver client:
import selenium.webdriver as webdriver
webdriver.Remote('http://localhost:4444', {})
or any other various RemoteWebDriver client I could find.
The solution was simple: Use the pathname /wd/hub
i.e.
import selenium.webdriver as webdriver
webdriver.Remote('http://localhost:4444/wd/hub', {})
Not a solution to the exactly Problem, but for people getting this error:
HTTP ERROR: 403
Forbidden for Proxy
RequestURI=/
Powered by Jetty://
This error appears e.g. if multiple instances of Selenium are running, so you need to shut it down by browsing to URL:
http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
If another instance was running there should appear okok
You have another process which is bound to same port i.e 4444.
Selenium Grid by default uses port:4444.
You either need to kill the process which is bound to port:4444 or else you need to use another port(below used 5555) for your hub.
Use following in command prompt:
java -jar selenium-server-standalone-2.15.0.jar -role hub -port 5555
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With