Selenium emulation without using webdriverbackedselenium

417 views
Skip to first unread message

Mattayi

unread,
Jul 30, 2012, 3:13:04 AM7/30/12
to webd...@googlegroups.com
Hi

I am using the following code in java.

        DesiredCapabilities desired_capabilities = DesiredCapabilities.firefox();
        WebDriver driver = new RemoteWebDriver(desired_capabilities);
        Selenium selenium = new DefaultSelenium("localhost", 4444, "*webdriver", "http://www.google.com");
        selenium.start(driver);

So as to use both webdriver/selenium api's. But it is showing below error message

Exception in thread "main" java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: com.thoughtworks.selenium.SeleniumException: No webdriver session id given
    at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:125)
    at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:134)
    at qa.addthis.com.WebBackedSel.main(WebBackedSel.java:19)

My jar version : 2.21
Am i doing it in wrong way or selenium.start(driver) not supported in java

Thanks
Mathew
 

Krishnan Mahadevan

unread,
Jul 30, 2012, 3:16:34 AM7/30/12
to webd...@googlegroups.com
What is "*webdriver" ?

You should ideally speaking be doing this :

DesiredCapabilities desired_capabilities = DesiredCapabilities.firefox();
WebDriver driver = new RemoteWebDriver(desired_capabilities);
WebDriverBackedSelenium s = new WebDriverBackedSelenium(driver, "http://www.google.com");


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"




 

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/rIH_zd77tVkJ.
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.

Mattayi

unread,
Jul 30, 2012, 4:10:38 AM7/30/12
to webd...@googlegroups.com
Thanks for the reply.

Yeah that case is working for me.
I was trying this http://seleniumhq.wordpress.com/2012/02/08/announcing-selenium-2-19-the-prancing-unicorn-release/
*webdriver is used instead of browser parameter with default selenium object. I don't know whether java bindings support this.
To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.

David

unread,
Jul 30, 2012, 2:55:45 PM7/30/12
to webdriver
That post is likely for other language bindings besides Java (and I
believe .NET too). Java and .NET can just use the more native
WebDriverBackedSelenium.

Sadly it only works for Python (and maybe Ruby) as of now. It won't
work in PHP or Perl w/o changes to the WebDriver/Selenium RC bindings
for those languages.

On Jul 30, 1:10 am, Mattayi <kuruvila.mat...@gmail.com> wrote:
> Thanks for the reply.
>
> Yeah that case is working for me.
> I was trying thishttp://seleniumhq.wordpress.com/2012/02/08/announcing-selenium-2-19-t...
> *webdriver is used instead of browser parameter with default selenium
> object. I don't know whether java bindings support this.
>
>
>
>
>
>
>
> On Monday, July 30, 2012 12:46:34 PM UTC+5:30, Krishnan wrote:
>
> > What is "*webdriver" ?
>
> > You should ideally speaking be doing this :
>
> > DesiredCapabilities desired_capabilities = DesiredCapabilities.firefox();
> > WebDriver driver = new RemoteWebDriver(desired_capabilities);
> > WebDriverBackedSelenium s = new WebDriverBackedSelenium(driver, "
> >http://www.google.com");
>
> > Thanks & Regards
> > Krishnan Mahadevan
>
> > "All the desirable things in life are either illegal, expensive, fattening
> > or in love with someone else!"
>
> >> webdriver+...@googlegroups.com.

Simon Stewart

unread,
Jul 30, 2012, 4:59:19 PM7/30/12
to webd...@googlegroups.com
That should work. Surprised that it hasn't. Do you see the same thing with 2.25?

Simon

Sam Gleske

unread,
Feb 17, 2014, 6:24:34 PM2/17/14
to webd...@googlegroups.com
Since 'driver' is the second argument in selenium.start you must specify it like so...

selenium.start(driver=driver)
Reply all
Reply to author
Forward
0 new messages