I am trying to find a way to search for one image in the context of a text selection. I am selecting the as a reference. The review name always changes. Once my script has found it I need to verify the text on the opposite side of the review button, in this case “First Reviewer Approved”. “First Reviewer Approved” could appear N times on the page. Has anyone done this before? If so, how did you solve the problem?
I am selecting the as a reference.
You’re selecting the what as a reference?
It’s a little hard to tell what you’re keying off, but assuming it’s the review name, you’ll want to find that and then you have a couple of options. In both cases you’ll want an image of the Review button with the hot spot placed to the right of it where the text you want to read appears. Option one is to create a search rectangle based on where the name was found and then look for the Review button in the search rectangle and read the text at the location of the hot spot. Option two is to find all of the Review buttons and then find the one that has a y value closest to that of the review title and, again, read the text at that location.