What does the error [error] XClick: invalid target, 'Spanish_relative_(1).PNG' mean?

Running into an issue I have not had before… I am getting this error when I try to use Xclick or Xclick relative:
[error]

XClick: invalid target, ‘Spanish.PNG’

My image is there, what is the error telling me in general?

I do not understand, I use the image for a visualassert and I do not get an error but in the next command I try to xclick the same image and it throws this error.
image

Strange. Do you get this error always or “only” sometimes? And only with this image?

100% reproducible. It is only with this image, there is a larger screenshot below.

  • It is part of a video that pops up for the user.
  • I am able to use xClick to click “English” which then drops down with the Two language options.
  • I am able to visualAssert the image for the “Spanish” option and it passes
  • I get the failure on the xClick of the identical image used moments before in the visualAssert

Any direction? Thank you!

Paste url of the page to find a better solution.

I never use image recognition because it’s easy can fail when window change dimension or when a site is responsive and move element in the page.

Usually i combine keyboard emulation to solve hard cases.

Paste url and i see, thanks

Ok, my solution was to drop the fancy image recognition and use an xpath locator… Thanks for the help!

xpath locator is faster than image reconition, if the web element locator etc. can complete the task, it is a better way to use that.

It is because your image ends in .PNG instead of .png

I realize this is a silly distinction, but that’s the only way I’ve been able to resolve this particular error.