Use of if else


#1

Hi,
i am working on a project where i have a keyword excel list, then my RPA is searching all the keywords in a website one by one, if it gets any search result it’s clicking on the search result then again doing another keyword search. But whenever it’s not getting any search result it’s stopped working cause it’s not getting anything to click on the search result. So i want to use a if else so that if i get any search result it will click on the result otherwise it will ignore clicking then repeat agin searching other keywords.
Main(Autosaved).xaml (18.3 KB)

if possible i would like to add a counter that will count how many keyword it didn’t get search result, at end of the RPA process it will show a message box.


#2

After Searching if some results found then what have to do ?


#3

then have to click on the search result.


#4

on all images or the 1st one only ?


#5

first one only


#6

i mean if you search for an image named cow then if you gets any result then you will click on the result, if you don’t get any search result when searching cow then you have to move forward to next keyword. @JobinJoy.jnj


#7

You can use ‘Element Exists’ property which returns boolean value. You can use this value under an if condition to click only if its true.

Let me know if that’s what you are looking for.

Thanks,
Rammohan B.


#8

Could you please show me where to write the code exactly by opening my xml file that i uploaded? @Rammohan91