Hello there! I wanted to know how can I use the activity ‘if’ in case that a popup appears. Like if this popup appears than click on the button ‘ok’, for example. How can I do this? Regards!
For that you can use check app state activity …it is meant for the same purpose
Cheers
If you are using the modern activities, to check the Ui element is exist on the screen is check app state activity. Take the check app state activity and indicate the popup in the screen. In target appear block give the click activity to click on the ok button.
IF you are using the click activities, use the element exist activity. Indicate the popup element on the screen and create a variable let say name it as boolflag in the output of element exist activity. Take a if condition in that give boolflag = True, in then block give the click activity to click on the Ok button.
Hope it helps!!
Hope it helps!!
Classic Design:
Element Exist Activity and Boolean Variable:
Use the “Element Exist” activity and indicate the popup with valid selectors.
Create a boolean variable to store the output, e.g., popup_exist.
If Condition to Check Popup:
Use an “If” condition and pass the popup_exist variable to check if the popup appeared or not.
If popup_exist is True
Then:
- Use a “Click” activity and indicate the valid selector to close the popup.
Modern Design:
Use/Application Browser Activity and Check App State:
Inside the “Use/Application Browser” activity, drag the “Check App State” activity and indicate the popup with valid selectors.
Within the “Check App State” activity, inside the “Target Appear” sequence, use a “Click” activity and indicate the valid selector to close the popup.
This modern design streamlines the process by directly utilizing the “Check App State” activity within the “Use/Application Browser” activity to handle the popup, making the automation more efficient and compact.