Issue 4918 in selenium: WebDriverBackedSelenium is throwing 'no protocol' error on instantiation with webDriver 2.27.0

24 zobrazení
Přeskočit na první nepřečtenou zprávu

sele...@googlecode.com

nepřečteno,
18. 12. 2012 4:59:4618.12.12
komu: selenium-develope...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Status-Untriaged

New issue 4918 by sand...@gmail.com: WebDriverBackedSelenium is
throwing 'no protocol' error on instantiation with webDriver 2.27.0
http://code.google.com/p/selenium/issues/detail?id=4918

We have automation project for our internal use and that used webDriver
2.25. We were using WebDriverBackedSelenium for some of the events. We
tried updating the selenium version to 2.27 with the firefox version to 16.
The setUp() creates the WebDriver instance and the WebDriverBackedSelenium
instance.

After the upgrade when we tried launching the test the setUp() started to
throw the error. While debugging we saw that creation of instance of
WebDriverBackedSelenium throws the error. We tried creating a small project
outside our framework and got the same error.

"Exception in thread "main" com.thoughtworks.selenium.SeleniumException: no
protocol:
at org.openqa.selenium.internal.seleniumemulation.Open.<init>(Open.java:33)
at
org.openqa.selenium.WebDriverCommandProcessor.setUpMethodMap(WebDriverCommandProcessor.java:281)
at
org.openqa.selenium.WebDriverCommandProcessor.<init>(WebDriverCommandProcessor.java:49)
at
org.openqa.selenium.WebDriverBackedSelenium.<init>(WebDriverBackedSelenium.java:31)
at TestSel227.main(TestSel227.java:14)
Caused by: java.net.MalformedURLException: no protocol:
at java.net.URL.<init>(URL.java:583)
at java.net.URL.<init>(URL.java:480)
at java.net.URL.<init>(URL.java:429)
at org.openqa.selenium.internal.seleniumemulation.Open.<init>(Open.java:31)
... 4 more
".

Our project uses a WebDriverBackedSelenium to simulate some of things. So
this error is stopping us to migrate to WebDriver 2.27 or 2.28(same issue).

Kindly look into the same.


Selenium version: 2.27 and/or 2.28
OS: Windows 7
Browser: Firefox
Browser version: 16 and/or 17.

Sample code :

WebDriver driver = new FirefoxDriver();
WebDriverBackedSelenium wdbsDriver = new WebDriverBackedSelenium(driver,"");

sele...@googlecode.com

nepřečteno,
18. 12. 2012 17:19:1618.12.12
komu: selenium-develope...@googlegroups.com
Updates:
Status: WorkingAsIntended
Labels: -Status-Untriaged Component-WebDriverBackedSelenium

Comment #1 on issue 4918 by barancev: WebDriverBackedSelenium is
throwing 'no protocol' error on instantiation with webDriver 2.27.0
http://code.google.com/p/selenium/issues/detail?id=4918

The second parameter (baseUrl) must be a valid URL, e.g.:

WebDriverBackedSelenium wdbsDriver = new
WebDriverBackedSelenium(driver,"http://localhost/");

sele...@googlecode.com

nepřečteno,
19. 12. 2012 7:28:3319.12.12
komu: selenium-develope...@googlegroups.com

Comment #2 on issue 4918 by sand...@gmail.com: WebDriverBackedSelenium is
throwing 'no protocol' error on instantiation with webDriver 2.27.0
http://code.google.com/p/selenium/issues/detail?id=4918

The same code used to work for selenium 2.25. Thanks for your help.

sele...@googlecode.com

nepřečteno,
19. 12. 2012 7:33:2319.12.12
komu: selenium-develope...@googlegroups.com

Comment #3 on issue 4918 by sand...@gmail.com: WebDriverBackedSelenium is
throwing 'no protocol' error on instantiation with webDriver 2.27.0
http://code.google.com/p/selenium/issues/detail?id=4918

The URL in the constructor can be any valid URL? What happens if that is
not a valid URL or points to a site that is down?

sele...@googlecode.com

nepřečteno,
19. 12. 2012 7:37:2419.12.12
komu: selenium-develope...@googlegroups.com

Comment #4 on issue 4918 by barancev: WebDriverBackedSelenium is
throwing 'no protocol' error on instantiation with webDriver 2.27.0
http://code.google.com/p/selenium/issues/detail?id=4918

By "valid" I mean "syntactically correct". Versions prior to 2.26 did not
check this parameter, it was a bug, and it's fixed now.

This parameter (baseUrl) is used to open relative URLs. If it points to a
non-existing address, you still can open absolute URLs.

sele...@googlecode.com

nepřečteno,
20. 12. 2012 0:57:0420.12.12
komu: selenium-develope...@googlegroups.com

Comment #5 on issue 4918 by sand...@gmail.com: WebDriverBackedSelenium is
throwing 'no protocol' error on instantiation with webDriver 2.27.0
http://code.google.com/p/selenium/issues/detail?id=4918

That makes sense. Thanks for the help.

sele...@googlecode.com

nepřečteno,
12. 2. 2013 0:30:5412.02.13
komu: selenium-develope...@googlegroups.com

Comment #6 on issue 4918 by JeffPFos...@gmail.com: WebDriverBackedSelenium
is throwing 'no protocol' error on instantiation with webDriver 2.27.0
http://code.google.com/p/selenium/issues/detail?id=4918

It is failing for me for a local file which I think would be a valid URL...
file:///root/devel/index.html will throw this error as well.

Odpovědět všem
Odpověď autorovi
Přeposlat
0 nových zpráv