Element Exist with If condition


I am trying to use Element exist with IF condition.

I am picking up date from excel and checking for the order number in browser. Some of the orders are closed and need to action. I am unable to set a condition where bot will take action only if order is not closed.

The flow is as follows

Open browser and type in order# and hit Enter
Order opens and if the state is closed then it should move to next order# is which in excel sheet
If the order is not closed then it should type in some data again from excel and save.

Can someone assist on how this can be achieved.

the first step is to analyse on which criteria / selector part / identifier an element can be recognized as closed. Therefore we do analyse the element structures in UiExplorer (if we are dealing with webapplications/-sites) we also can use the browser tools (F12).

  • pick up an unclosed element
  • pick up a closed element

look out for the differences.

Maybe you can share some details / screenshots with us

I cannot share the screenshot of entire page but trying to provide information as much as possible

Once I enter the URL in browser a page opens and I need to search for order# using “Type Into” in search box image

Below is the details page appears after serach order# in search page

What I need to achieve is if the state of the order is Closed then it should again click on search field and type in next order from the excel sheet and if the state is not closed then type data from excel file in highlighted area and click save.

1 Like

we do need more hints on the strucures (uiExplorer, F12 Web Tools). Thanks

Hello @Saurm21,

Do these

  • Read Range, get output like outDt
  • For Each Row, pass outDt as input
  • Inside For Each Row use AttachBrowser and use Type into activity to Search for Ticket Number
  • then use Get text activity to check the state of the ticket, use IF Condition like outStr.ToString.Equals(“Pending”)

Then: Use type into activity to Add the values
Else: Nothing


This worked. Thank you so much.

1 Like

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