Issue on unnecessary popups

Asked by Sikulipro

I have written a script it runs correctly, but what i want to do, some times i get some unnecessary popups in the application,

ex. if i get a popup like 446541.png it should go with a click and if that popup does not appears then it would go to next process,

i think we can can do it in if condition that if it get that particular image( 446541.png) then it will click 'OK' on that popup and if it does not found it would be fine ....i am trying to write like

if 446541.png .exist

click 116543.png

else:

click 78441856.png i know this is incorrect code, so how it should be ?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

not really sure what your equation is.

… but

if exists(image):
    click(image1)
else:
    click(image(2)

Revision history for this message
Sikulipro (saindane-harshal) said :
#2

Thanks RaiMan, that solved my question.