I'm testing a web page, which occasionally has a pop up asking if the user wants to complete a survey. I've been trying to create a module that will click the "No Thanks" button if the dialog pops up.
The following if statement works great when the pop up dialog appears, i.e. the module successfully clicks the "No Thanks" button, if the pop up is displayed.
Code: Select all
if(repo.No_Thank_You_Button_on_Survey_DialogInfo != null)
{
// code to click the "No Thanks" button
}
Is there a way to edit that if statement, so that the code within it, will only execute if the "No Thanks" button is visible in the pop up.
Thanks!