Please find attached pic, i need to select continue shopping from the pop upenter image description here
Asked
Active
Viewed 381 times
-4
-
this question is vague but if you're looking to try to click a button on the popup you need to use the driver switchTo command. http://stackoverflow.com/questions/19403949/how-to-handle-pop-up-in-selenium-webdriver-using-java – Chris Hawkes Nov 03 '15 at 13:08
-
Welcome to Stack Overflow! What have you tried and what was the result? As you did in school... please show your work. :) It's part of the process of getting questions answered on SO. It's helpful to you because it forces you to investigate your own problem and think it through. It also proves to readers that you did your homework and made a reasonable attempt to answer your own question. Thirdly, it helps readers find and diagnose the problem resulting in a better answer for you and less time wasted for us. – JeffC Nov 03 '15 at 19:02
2 Answers
1
Actually, in your case it's not a regular Popup of browser. That's just a combination of Div instances. You can try sth like this:
driver.findElement(By.id("fancy_notification_content")).findElement(By.className("continue_shopping")).click();

徐文灏
- 11
- 1
0
popups handler is IAlert.
IAlert alert = driver.SwitchTo().Alert();
if (alert != null)
{
alert.Accept();
}
but i didn't know if this is the case.

Leon Barkan
- 2,676
- 2
- 19
- 43