Attaching WebDriver to existing browser

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Attaching WebDriver to existing browser

rajesh thirumalasetti
We have an automation scenario where click on a window application button launches browser. The automation need to act upon this browser. Since this is not launched by Webdriver, I could not find a way to this browser. I have searched a lot in internet but nothing solved my problem.

I would request you to kindly help me on the same ASAP

Thanks and Regards,

Rajesh T

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1b3376df-ca34-49c3-9019-d5c20d286734%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Attaching WebDriver to existing browser

Titus Fortner
That use case is explicitly not supported by Selenium. In order for a driver to interact with a browser, the driver has to be the thing that created the session/opened the browser in the first place.

On Tue, Feb 21, 2017 at 7:11 AM, rajesh thirumalasetti <[hidden email]> wrote:
We have an automation scenario where click on a window application button launches browser. The automation need to act upon this browser. Since this is not launched by Webdriver, I could not find a way to this browser. I have searched a lot in internet but nothing solved my problem.

I would request you to kindly help me on the same ASAP

Thanks and Regards,

Rajesh T

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1b3376df-ca34-49c3-9019-d5c20d286734%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAKSYPugTeoHsjdnUn70iCn8SyVKP0eBFszev4rK9SHtb%3DGXhaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Attaching WebDriver to existing browser

Anand Somani
Not supported by Selenium. Limitation of Selenium. :(

Thanks & Regards,
Anand Somani |
Skype ID: anand.somani
LinkedIn Profile : https://www.linkedin.com/in/somanianands
Visit Blogs: http://seleniumtestingguide.blogspot.in/

On 21 February 2017 at 17:09, Titus Fortner <[hidden email]> wrote:
That use case is explicitly not supported by Selenium. In order for a driver to interact with a browser, the driver has to be the thing that created the session/opened the browser in the first place.

On Tue, Feb 21, 2017 at 7:11 AM, rajesh thirumalasetti <[hidden email]> wrote:
We have an automation scenario where click on a window application button launches browser. The automation need to act upon this browser. Since this is not launched by Webdriver, I could not find a way to this browser. I have searched a lot in internet but nothing solved my problem.

I would request you to kindly help me on the same ASAP

Thanks and Regards,

Rajesh T

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1b3376df-ca34-49c3-9019-d5c20d286734%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAKSYPugTeoHsjdnUn70iCn8SyVKP0eBFszev4rK9SHtb%3DGXhaQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAEVRH1F%3DODvF3gP5x44sXtaNLsSEJKOFF6T8UVmSWLAXR59gYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Attaching WebDriver to existing browser

Andreas Tolfsen
In reply to this post by Titus Fortner
Also sprach Titus Fortner <[hidden email]>:

> That use case is explicitly not supported by Selenium. In order for a
> driver to interact with a browser, the driver has to be the thing
> that created the session/opened the browser in the first place.

It might not be explicitly supported by Selenium, but individual
drivers do support this.

The first driver that made it possible to attach to an existing browser
was OperaDriver for the Presto-based Operas.  You would spin up the
driver, navigate the browser to opera:debug and hit a ‘Connect’ button
on that page.  This worked because the driver filled the role of the
server, and the browser effectively acted as the client.

Marionette and geckodriver in Firefox also lets you connect to an
existing browser instance, _provided_ you have started Firefox with the
--marionette flag already:

        % geckodriver --connect-existing

This is slightly less flexible than the OperaDriver solution, but this
tells geckodriver to connect to the Marionette remote control server
that is already running inside Firefox.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1487892464.31320.11.camel%40mozilla.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Attaching WebDriver to existing browser

Mike Hetzer
In reply to this post by rajesh thirumalasetti
Easiest, perhaps only way to do what you need to do would be to:
1. Identify the browser window that is spawned using Windows Automation.
2. Grab the URL string from the navigation bar.
3. Spin up a webdriver using that stored string.

We've had to do this for a couple projects.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c177779b-6ae5-49c7-8d1c-a261b0b6c09c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Attaching WebDriver to existing browser

David
On Thursday, April 19, 2018 at 7:34:29 PM UTC-7, Mike Hetzer wrote:
Easiest, perhaps only way to do what you need to do would be to:
1. Identify the browser window that is spawned using Windows Automation.
2. Grab the URL string from the navigation bar.
3. Spin up a webdriver using that stored string.

We've had to do this for a couple projects.
 
Can you clarify/elaborate on this? This sounds like step 3 is using value taken from step 2, and step 2 sounds like grab URL in nav bar of browser window found in step 1. Overall this sounds like spin up a separate browser via WebDriver and go to same URL of the browser found in step 1, but we leave browser in step 1 alone/orphaned for the rest of the browser automation as you don't (or can't) specifically connect to it as an existing WebDriver browser session.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a0785dbd-e796-47fd-8824-ef6f987a0fe9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Attaching WebDriver to existing browser

Naveen Kumar-4
In reply to this post by Mike Hetzer
Can you please elaborate this, in knowledge selenium can't attached with existing browser (already opened before selenium web driver start).

On Fri, 20 Apr 2018 8:04 am Mike Hetzer, <[hidden email]> wrote:
Easiest, perhaps only way to do what you need to do would be to:
1. Identify the browser window that is spawned using Windows Automation.
2. Grab the URL string from the navigation bar.
3. Spin up a webdriver using that stored string.

We've had to do this for a couple projects.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c177779b-6ae5-49c7-8d1c-a261b0b6c09c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CADUCq7wkPj8mN-0jDg2kKT%2BYd_z1JaoxSVxdcikxOM6fLMJOBA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Attaching WebDriver to existing browser

Snehal Biche
In reply to this post by rajesh thirumalasetti
I have never tried but check winium driver if this driver helps you. This is for windows UI

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/cd2d6f79-8930-4243-93a3-e094ec4d1011%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Attaching WebDriver to existing browser

Mike Hetzer
In reply to this post by David
Pretty much yeah.

In order to find this with Windows Automation, you would have likely already found the Process ID or the browser window - with this information you can kill the unused/orphaned browser window.

If you are using java frameworks - you'll likely have to use winium or some other library.

C# projects can use Windows Automation, but I prefer the TestStack: White project


On Friday, April 20, 2018 at 4:40:41 PM UTC-4, David wrote:
On Thursday, April 19, 2018 at 7:34:29 PM UTC-7, Mike Hetzer wrote:
Easiest, perhaps only way to do what you need to do would be to:
1. Identify the browser window that is spawned using Windows Automation.
2. Grab the URL string from the navigation bar.
3. Spin up a webdriver using that stored string.

We've had to do this for a couple projects.
 
Can you clarify/elaborate on this? This sounds like step 3 is using value taken from step 2, and step 2 sounds like grab URL in nav bar of browser window found in step 1. Overall this sounds like spin up a separate browser via WebDriver and go to same URL of the browser found in step 1, but we leave browser in step 1 alone/orphaned for the rest of the browser automation as you don't (or can't) specifically connect to it as an existing WebDriver browser session.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/89d0d860-6a2d-41f4-ab0b-3309f45e7c8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.