0

There is one delete button, on clicking the delete button it shows a grid having the message "Please wait...", then on that grid, one pop-up appears "Do you want to delete?"

I want to switch to that popup and click on "OK" so I am using

driver.switchTo().alert().accept();

but unable to accept the popup.

  • 3
    Could you add the html of the application you want to interact with as well as the code for the entire procedure and the error you get? Right now it's hard to find out if you encounter a timing problem because of the wait or if it's actually a problem regarding the popup. My guess would be that your pop up is not a browser alert (means it's prompted via Javascripts alert function) but a custom HTML element for which you can't use switchTo().alert() but without more information this is only a guess. – Daniel Feb 20 at 11:21
  • Please provide us more information. – Selçuk Ayhan Feb 26 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.