0

I run a test script where in a pop up window a confirmation needs to be clicked:

css=#mod-fap-search-overview-confirmDialogButton2 > div

Unfortunately, this pop up is not always displayed hence I want Selenium IDE to continue and not wait for it to click it.

What is the trick on doing so ?

1
  • many thx for your anser and apologies on coming back so late to it. I am not familiar with "writing" code in selenium IDE rather than recording and modifying it. May it be possible to have some more hints pls ?
    – user55473
    Commented Feb 14, 2023 at 10:06

2 Answers 2

0

There will be such a tricky scenarios. To handle this:

  • You can write step if pop-up #mod-fap-search-overview-confirmDialogButton2 is displayed then click on button
  • Else continue and you have to apply timeout for this. Approx 10 sec may be, pls that you take a decision how much secs it needed?
  • Additional info : If pop-up don't appear still execution will wait for 5/10 sec for pop-up and continue without pop-up
0

There are multiple workarounds to handle such scenarios while doing web automation using Selenium IDE. While working in test automation services company and developing frameworks in multiple languages below are top 03 approaches widely used -

Method 1 - Use Selenium's isDisplayed() method. If Popup is displayed, click required element else bypass the click. This will require Selenium waits as well.

Method 2 - If assertions are implemented, use SoftAssertions which will not stop your execution but will highlight the failed part in your report.

Method 3 - If multiple attempts are required to validate popup, then use combination of While loops along with Boolean variables.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.