Open tite54296 opened 7 years ago
As asked in #119, what webdriver and browser are you using with Agouti?
I am using chromedriver and chrome.
Thanks, do you observe the same behavior with other webdrivers (ex. Chrome via Selenium, or Firefox via Selenium)?
I would have to check. Let me check it tomorrow and come back to.you.
Hi @sclevine this is happening with all of the drivers. This is the scenario: I am currently testing an electron app using the agouti webdriver (so far, so good). For this app I need to register to a website first, so I instantiate a driver for the electron app and another for the webpage. Now, the issue shows up when i click a button in my electron app that opens a browser tab, I thought that since the tab is opened within the same browser I am using with agouti It should detect the new tab even though it was opened from the electron app.
To clarify, you've only observed this behavior when using two webdrivers simultaneously, one with electron, and one with a real browser?
Agouti is just a wrapper for the API endpoints provided by the webdrivers. If this scenario isn't supported by the webdrivers, there unfortunately isn't much we can do in Agouti to make it work.
As a workaround, could you grab the new browser tab link instead of clicking the button, and then open that link using a new webdriver instance? That should give both webdrivers control over their respective pages.
I'll try that. Thanks :)
This is a replica of bug #119 since the issue was closes before I could answer to @sclevine. "Is it possible to switch between browser tabs? I tried using SwitchWindow and does not seem to work. I also used WindowCount to validate that the new tab is being recognized as a window but does not seem like it since it is returning 1 instead of 2 which is the number of tabs at the time." I am using the WindowCount but it is returning only one window even though two tabs are opened.