How can i use if condition for web elements

Hi Team,
I want to download a particular report so if the report records exceeds 10k then it prompts the user to either choose option to download the report or mail to respective user’s mail id. So this option only prompts only if reports exceeds 10k records (here i want to choose wait for it as shown in fig wait) or else it directly prompts download button (here i want to choose download which is default as shown in fig download). So i want to use a condition where if download button is not found then search for wait for it button. Is there a way to achieve this?


You can use Control Exists interaction

Amit Anand

Hi Amit,

I have recorded the wait for it with control exists interaction and then when i test run once it reach the step there is no instruction executed it is simply waiting. Please let me know.


Hi Naveen,

ControlExists interaction returns whether a particular control exists or not in form of a Boolean value. So after you have captured ControlExists, you should add an If statement to check its value and if it’ true then write the logic you want to execute and similarly, otherwise.