Issue
I work with Excel VBA Selenium under Windows 10. I want to access a Chrome window that has previously been opened by another app and of whose name only the first part is known, the rest is a code that changes each time it is created. It is open together with other tabs in the active Chrome browser.
In order to start Chrome with Selenium, all I know to do is
Set dr = New ChromeDriver
This creates an Object "dr". When I look up the properties of dr, the property "Windows" shows the value "BrowserNotStartedError / Browser not started. Call Get, Start or StartRemotely first."
Start or get both create a new Chrome instance which does not allow me to access windows in the already open instance. I tried to use this code without "New", but this does not work. I have not found any hint on how to work on the existing instance of Chrome. Is it possible at all? If not, how else could I access any existing window? The URL is unique and can only be created by the 3rd party app for security reasons. If I try to copy the URL to the new Chrome instance I get an authentication error, so this is not an option. This web page basically contains a menu that allows me to download certain data safely, which I want to automate. Any help is appreciated.
Solution
My question has been resolved. With a Selenium driver for Chrome, it is not possible to access Chrome tabs that have not been created with Selenium. According to QHarr, it could be done by using shell/internet explorer to grab a handle on existing IE windows. In this case, of course, the app would have to create the HTML file with IE, i.e. the default browser would have to be IE.
Answered By - Volker Piasta
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.