Selenium 2 doc error

2 views
Skip to first unread message

Danny Guerrier

unread,
Dec 16, 2009, 9:48:20 AM12/16/09
to webd...@googlegroups.com
The doc says you can instantiate a WebDriverBackedSelenium object by doing this
Selenium selenium = new WebDriverBackedSelenium(...)

This is not correct.  WebDriverBackedSelenium gives you a WebDriverBackedSelenium object not Selenium.  The doc should read;
WebDriverBackedSelenium selenium = new WebDriverBackedSelenium(...)

Eran M.

unread,
Dec 16, 2009, 9:52:18 AM12/16/09
to webd...@googlegroups.com
WebDriverBackedSelenium extends DefaultSelenium which, in turn, implements the Selenium interface. You should use the Selenium interface - as it's generally wise to write your code against interfaces, not specific implementations.
In this case the only method WebDriverBackedSelenium has which is not in the Selenium interface is getUnderlyingWebDriver. You should use this method carefully anyway, as mixing calls to WebDriver and Selenium will yield some Interesting Results.

Eran

2009/12/16 Danny Guerrier <dgue...@gmail.com>

--

You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.

Simon Stewart

unread,
Dec 16, 2009, 10:48:19 AM12/16/09
to webd...@googlegroups.com
Ummm... it should be fine to make calls to the underlying webdriver
instance if necessary. It's probably inadvisable to go around
switching frames or windows because the selenium implementation tracks
that state slightly differently.

Simon
Reply all
Reply to author
Forward
0 new messages