0

I am trying to click an image during automated testing using Watij. I am specifically trying to use SymbolFactory's src (instead of name, id, etc.) as detection.

HTML:

<input type="image" src="lib/img/btnFindStore.png" style="border-width:0px;">

Java:

ie.image(SymbolFactory.src, "lib/img/btnFindStore.png").click();

I am wondering why it throws watij.runtime.UnknownObjectException at this line.

Thanks!

Chandrew
  • 16,987
  • 4
  • 24
  • 40

1 Answers1

0

Yeah, so using ie.button here is the solution

ie.button(SymbolFactory.src, "lib/img/btnFindStore.png").click();
Chandrew
  • 16,987
  • 4
  • 24
  • 40