I have the following PageFactory Objects
@AndroidFindBy(id = "action3")
public MobileElement eleAction3;
public void tap(MobileElement element) {
System.out.println(element);
}
However the Mobile element eleAction3
is not available on the App screen. Now if I do
tap(eleAction3);
It still tries to find the object in the page and throws NoSuchElementException
. I’m just printing the MobileElement
. I’m not even trying to perform any action on it.
org.openqa.selenium.NoSuchElementException: Can't locate an element by this strategy: Locator map:
- native content: "By.id: action3"
- html content: "by id or name "eleAction3""
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
Is it because of toString()
implementation somewhere in the inheritance?