Unable to click an icon

Hey Guys
Hope you can help.
I have a simple test which searches for an Object on a page, highlights it, and then takes a screenprint if the Object appears.
What I am trying to do is click the refresh icon on the page if the Object does not appear, however this is proving impossible so far.
Each run fails with the same error below:

I have used both SpyWeb and Record Web to record the objects and have added the CSS selector manually.

From the error, Im guessing that there is possibly an issue switching iFrames, however when I add a manual switch, I still get the same error.

Here is the code for the ‘refresh button’



Refresh Button.PNG


rule is - keep xpath as short as possible
so in your case testObject definition should be: xpath = //td[@class=" ECCN4RB-m-i"]/img

remove space in class attr. value

1 Like