Skip to content

Instantly share code, notes, and snippets.

@jarib
Created December 10, 2009 19:24
Show Gist options
  • Save jarib/253579 to your computer and use it in GitHub Desktop.
Save jarib/253579 to your computer and use it in GitHub Desktop.
org/openqa/selenium/remote/RemoteWebDriver.java:428:in `throwIfResponseFailed': java.lang.RuntimeException: <html> (NativeException)
<head>
<title>Error 403 Forbidden for Proxy</title>
</head>
<body>
<h2>HTTP ERROR: 403</h2><pre>Forbidden for Proxy</pre>
<p>RequestURI=/wd/hub/session</p>
<p><i><small><a href="http://jetty.mortbay.org">Powered by Jetty://</a></small></i></p>
</body>
</html>
from org/openqa/selenium/remote/RemoteWebDriver.java:390:in `execute'
from org/openqa/selenium/remote/RemoteWebDriver.java:74:in `startSession'
from org/openqa/selenium/remote/RemoteWebDriver.java:61:in `<init>'
from org/openqa/selenium/remote/RemoteWebDriver.java:69:in `<init>'
from sun/reflect/NativeConstructorAccessorImpl.java:-2:in `newInstance0'
from sun/reflect/NativeConstructorAccessorImpl.java:39:in `newInstance'
from sun/reflect/DelegatingConstructorAccessorImpl.java:27:in `newInstance'
from java/lang/reflect/Constructor.java:513:in `newInstance'
from org/jruby/javasupport/JavaConstructor.java:291:in `newInstanceDirect'
from /opt/jruby/lib/ruby/site_ruby/shared/builtin/javasupport/core_ext/object.rb:91:in `new'
from remote_test.rb:15
WD_URL = "http://localhost:4444/wd/hub"
if RUBY_PLATFORM =~ /java/
require "java"
Dir['**/*.jar'].each { |f| require f }
import org.openqa.selenium.remote.RemoteWebDriver
import java.net.URL
import org.openqa.selenium.remote.DesiredCapabilities
cap = DesiredCapabilities.firefox
url = URL.new(WD_URL)
d = RemoteWebDriver.new(url, cap)
else
$LOAD_PATH << "common/src/rb/lib"
$LOAD_PATH << "remote/client/src/rb/lib"
require "rubygems"
require "selenium-webdriver"
driver = Selenium::WebDriver.for :remote, :server_url => WD_URL
end
./remote/client/src/rb/lib/selenium/webdriver/remote/default_http_client.rb:64:in `create_response': Unexpected content type: "text/html" (403) (RuntimeError)
<html>
<head>
<title>Error 403 Forbidden for Proxy</title>
</head>
<body>
<h2>HTTP ERROR: 403</h2><pre>Forbidden for Proxy</pre>
<p>RequestURI=/wd/session</p>
<p><i><small><a href="http://jetty.mortbay.org">Powered by Jetty://</a></small></i></p>
</body>
</html>
from ./remote/client/src/rb/lib/selenium/webdriver/remote/default_http_client.rb:37:in `call'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:1053:in `request'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:2136:in `reading_body'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:1052:in `request'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:1037:in `request'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:543:in `start'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:1035:in `request'
from ./remote/client/src/rb/lib/selenium/webdriver/remote/default_http_client.rb:31:in `call'
from ./remote/client/src/rb/lib/selenium/webdriver/remote/bridge.rb:372:in `raw_execute'
from ./remote/client/src/rb/lib/selenium/webdriver/remote/bridge.rb:77:in `create_session'
from ./remote/client/src/rb/lib/selenium/webdriver/remote/bridge.rb:56:in `initialize'
from ./common/src/rb/lib/selenium/webdriver/driver.rb:14:in `new'
from ./common/src/rb/lib/selenium/webdriver/driver.rb:14:in `for'
from ./common/src/rb/lib/selenium/webdriver.rb:48:in `for'
from remote_test.rb:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment