Not sure if it is just me, but I come to see that WebDriver does not load pages completely each time the tests are run. I saw this during first homework exercises when details page sometimes failed to load the pagination (when it was there) during tests
Here some examples from current homework exercises:
Normal BestBuy homepage view:

Failed ( no flyout) view:

Normal search results view (with tabs):

Failed view (no tabs):

Not sure if it is WebDriver or Browser behavior and yes I used latest Chrome for these tests
I Have the same/similar issue. When running the test(sometimes) the "Latest deal & more"window shows up and test fails. When I open the page manually I never can see this pop up window
That flyout window is shown on the first visit to page I gather. Determined by cookies ...
My script actually waits for it to appear and then clicks the X to close it
Oleg, What code do you use to switch to flyout. please?
You can find flyout itself with locator like
And the close button on it with simply
Yes, It's exactly what I Use, thank you
Just make sure you explicitly wait for them with wait.until and an expectedcondition
Ok, I'll try. thank you so much for the quick response
You are most welcome and it is no problem, so if you have any issues with what that wait.until would look like, just ask :)
Oleg, What is wrong with that:
driver.switchTo().frame("at-newsletter-modal-container");
WebDriverWait wait = new WebDriverWait(driver, 10);
WebDriver driver = wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.className("at-newsletter-modal-container")));
I got error: org.openqa.selenium.NoSuchFrameException: No frame element found by name or id at-newsletter-modal-container
Thank you
It is not an iFrame, just a DIV element
Thsnk you
Anytime :)