Element Exists activity if image appears on page


I’m trying to use the Element Exists activity to check if an image appears on the page and if so, to copy the path to said image.

In my robot, I use a For Each Row activity to check an Excel sheet, navigate to a URL. Check to see if there is an image, if so, copy the path save it to the data table, then move to the next row.

I created the activity using this site: DEFINE_ME. When I test using a message box, the Element Exists variable shows TRUE, and copies the path ‘https://els-jbs-prod-cdn.jbs.elsevierhealth.com/pb/assets/raw/Health%20Advance/journals/hrthm/Mark_Link_Photo.jpg’ to the spreadsheet. When the robot moves to the next row, goes to the URL and an image appears, the Element Exists variable comes back as FALSE and saves ‘https://els-jbs-prod-cdn.jbs.elsevierhealth.com/pb/assets/raw/Health%20Advance/journals/hrthm/Mark_Link_Photo.jpg’ to the variable again. Is this because the robot is looking for the image that is only on the URL above? If so, how do I make this dynamic?

1 Like

Anyone have any ideas?

Can you post an image of the For Each Row activity you are using to get this done?

I’m not sure how much help these will be, but they are attached (ignore the commented out activities, I’m testing many things)

@EMueller Is this the Same URL DEFINE_ME robot is opening for each row?

When I look at the ‘Edit Selector’ it shows that it’s always looking for this:

Which I think is unique to that specific URL

I just realized that what I was trying to copy in, didn’t paste.

So, the activity has this in the edit selector: "webctrl parentid=‘918df0d0-44c1-4023-83cc-643c3ff0896f’ tag=‘IMG’ " . I’m guessing the parentid part is unique to the page I’m using while building the robot.