Inside a for loop, if it is not clickable, go next


Hi guys, currently I’m facing a problem. My project was each cell in the timetable have a ‘titlename’ which was clickable. If click it, it will bring me to a website which RPA will make a copy of the content. But not every cell have a clickable ‘titlename’. I keep encounter error when the ‘titlename’ of the cell was not clickable. How can i do a error handling(? maybe) or a skip not clickable cell within this situation? What i hope was if not clickable just skip this item. Any idea and suggestion? Regards for your reply.

(Red things in image was clickable while blue was not clickable)

@Wei_Ji_Kwok Try catch can be used.In catch block we could catch the nonclickable title and skip to the next item and log the exception message as non clickable item or source exception message

image
is it i put the try catch at the click title ? how can i catch nonclickable item yaa ?

Hello @Wei_Ji_Kwok

Inspect on a Title with link and without link using UiExplorer. There should be some attribute different in both. Then we need to make the selector dynamic within the loop and use an element exist. If element exists for title with Link then click on it.

Thanks