Open hcastro opened 6 years ago
Our not-ideal solution to this was:
loginButton: 'abc'
and then call it via:
this.api.getMobileEl('id', this.elements.loginButton.selector);
I agree though, it'd be cool if nightwatch-extra could read a page object element object.
Do
nightwatch-extra
mobile commands for native apps work out of the box when using the Nightwatch page object implementation?Under the hood,
Nightwatch
(latest release) switches between xpath, css selector or recursion modes when interpreting page object command methods. However, if I need to to useaccessibility id
orname
locator strategies, for example, there are no global methods (in the same vein asuseXpath
oruseCss
) available to do so.Currently, I'm seeing the following error when triggering a page object command using a mobile custom command:
PageObject File looks like the following: