How to add condition when some other window pops up

I am Automating this Application and after Login sometimes a popup comes and we have to click ‘NO’ button in that window.
So I am not able to figure it out like how to click NO on that window and my Test also won’t fail too.

Hi @Master_B and welcome to the forum.

You don’t mention which library you are using, but in general you could create a keyword that tries to click the NO button if it appears before a defined timeout. If timeout occurs you can still continue execution without failing the keyword.

1 Like

Let’s say I am using RPA.Desktop.Windows, and the popup window title is Confirm…then can you tell how to do it now?

I don’t know what locators work, but the structure could be something like

*** Keywords ***
Click NO
    Control Window    name:Confirm  timeout=5
    Click   name:'NO'  timeout=2

*** Tasks ***
My Task
    Comment  Do stuff
    Run Keyword And Ignore Error    Click NO
    Comment  Do more stuff
2 Likes

Thanks @Teppo :blush:
Got an idea now, will start working for the same.