'Selenium Applitools swtich Tab/Window for checkpoint
How do I switch the browser tab/window to compare the views in Applitools? Problem is I've got eyes.check on a login window and after loggin in there is a new window opened but the checkpoint compares the old tab/window. Target.window() does not take any parameters. How do I do that?
Thanks
Solution 1:[1]
You'll need to switch the driver context to the new tab using Selenium before taking the screenshot with Applitools.
You can see methods on tab switching in Java Selenium from this answer: link
At a high level, what you should do is:
- Open the new tab
- Use Selenium to switch the driver context to the new tab
- Call eyes.check()
Additionally, be sure to set the driver object equal to the return value of your call to eyes.open(). Doing this will ensure the Applitools Eyes object can keep track of the context the driver is in.
myDriver = eyes.open(driver, appName, testName, viewportSize);
// switch browser context using myDriver variable
// take screenshot etc.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | MJApplitools |
