If conditional get element

Hello there.

I’ve done my automation and it worked but I have few cases that the website give me a poup up message and stop my automation.

What is the best option to fix this?

Can I insert get element conditional and choose if the the get element appears I do one way, if the get element dont’s apperar I choose other way?

Cheers,

Yes
Save the result by putting a variable in “Elements” (type a name, for instance “results”, and press Ctrl+K to create a variable of the right type)
then set “MinResults” to 0

  • if it finds something, it will do that inside the body of get elements
  • if nothing was found, you can use the If statement and check on results.Count = 0 and execute something based on that.

Hello. Thanks for the answer

I try to do but I’m getting an error, print below:

What is the error? We can not help you if you dont include the error ( mouse over the red thing, or press run )

Ohh sorry :slight_smile:

image

i’ve change the scope and it not get the error.

Thanks

You need to create the results variable… read my last post again, (type results in the elements property on get elements and press ctrl+K)

Sorry, I didn’t undertand.

I’ve created a result variable, please see my print below:

You need to use the right type, string is not correct. And you need to add it to the “elements” property of get element

Sorry, I’m begginer.

Whats is the right type?

You mean click element?

delete the variable results.
select get elements and click the input field next to elements.
type results in the field and press ctrl+K

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.