RemoteWebDriver generates 403 Forbidden for Proxy error

2,638 views
Skip to first unread message

DmitryNFL

unread,
Nov 7, 2011, 3:57:32 PM11/7/11
to Selenium Users
Hi there. I'm trying to setup a basic RemoteWebDriver test to an
instance of Selenium Server either running on the same machine or on a
remote machine. In both cases I get this:

org.openqa.selenium.UnsupportedCommandException: <html>
<head>
<title>Error 403 Forbidden for Proxy</title>
</head>
<body>
<h2>HTTP ERROR: 403</h2><pre>Forbidden for Proxy</pre>
<p>RequestURI=/session</p>
<p><i><small><a href="http://jetty.mortbay.org">Powered by
Jetty://</a></small></i></p>


Here is the Sample Class using TestNg @Test directive:


public class RemoteDriverTest {

@Test
public void testRemote(){

URL remoteServer;
try {
remoteServer = new URL("http://localhost:4444/");
WebDriver driver = new RemoteWebDriver(remoteServer,
DesiredCapabilities.chrome());
driver.get("http://www.google.com");
}
catch(MalformedURLException ex){
//DO SOMETHING...
}

}
}

I've tried Firefox and IE as capabilities with the same results.

Here is the server command that is running:

java -jar selenium-server-standalone-2.7.0.jar -interactive

This is running on Windows 7 OS.

Any help or directions to some better documentation is appreciated in
advance.

Dmitry


Luke Inman-Semerau

unread,
Nov 7, 2011, 4:01:38 PM11/7/11
to seleniu...@googlegroups.com
The url should be "http://localhost:4444/wd/hub"  not "http://localhost:4444/"



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Reply all
Reply to author
Forward
0 new messages