Launching browser with web driver extension and using remote web driver to connect to it

47 views
Skip to first unread message

Dakshinamurthy Karra

unread,
Jan 11, 2015, 12:46:32 AM1/11/15
to seleniu...@googlegroups.com
Hello,

In one of the projects, I want to launch the browser through Java and actually connect to it using ruby. The approach I felt feasible is:

1. Launch the browser using selenium web driver - e.g FireFoxDriver
2. In the ruby script use remote web driver and connect to the browser.

This works. However, when FireFoxDriver is created it also creates a connection to the web driver. Is there any way to just launch the browser without also creating a connection to it.

Thanks in advance.
KD

Krishnan Mahadevan

unread,
Jan 12, 2015, 3:14:42 AM1/12/15
to Selenium Users
I guess this is because the Selenium required server component for firefox is actually a xpi (plugin). I dont think there is any way in which you can get past this for firefox atleast.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4027f66b-5829-464b-aa23-2c4090651773%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

PeterJeffreyGale

unread,
Jan 12, 2015, 3:54:06 AM1/12/15
to seleniu...@googlegroups.com
Couldn't you just open the browser by calling the OS level executable and not use WebDrive at all? Or launch it from aRuby based driver?

David

unread,
Jan 12, 2015, 4:57:47 PM1/12/15
to seleniu...@googlegroups.com
Interesting. I'm confused. Can you elaborate how this works for you along with the particular issue of the FirefoxDriver connection?

The way I see it is step 1 creates an instance of Firefox using Java FirefoxDriver, this establishes a WebDriver session locally with the FirefoxDriver (no server JAR started). Step 2 invokes a RemoteWebDriver instance and tells it to connect to some Selenium server and establish a connection. Unless I'm mistaken, this generally is to establish a new session. I don't recall a way to connect to a Selenium server with RemoteWebDriver and tell it to return/connect with a specific existing session. So then how does this "work" for you?

If it did work, I'd assume you probably have to use RemoteWebDriver in step 1 to launch the browser initially as well because FirefoxDriver is all local w/ no server for other driver instances to connect to as Krishnan mentioned being an XPI Firefox extension.

The only way to launch a browser w/o a connection or session is to not use Selenium (e.g. AutoIt, Sikuli, programming code to start an application/process) but then doing it that way, you have no Selenium WebDriver session handle to connect to, meaning you'd have to do all the work w/o Selenium as well.  From what I recall of past discussion/info, the only option for this (using Selenium, connect to browser not launched by Selenium) may be with the IE driver, though it was experimental or hacky, or use WatiN/Watir instead.
Reply all
Reply to author
Forward
0 new messages