Geetha
Geetha

Reputation: 1

serenity-js screenplay pattern testing on mobile devices for native apps

I am trying to find the way to find locators for the android/iOS native app and use it with the screenplay pattern. The PageElement located By does not have a method to specify locators prefixed with the '$'

Ex: For locating the username field on the Login page on an android app, if I specify the locator to be found using the By method

static usernameField = PageElement.located(By.id($('android=new UiSelector().textContains("username")')))

This does not work as the By. method only supports selectors with id/css/tagname/xpath

What locator type should be used for the locators for mobile apps?

Can anyone help me on how to do this?

Upvotes: 0

Views: 39

Answers (0)

Related Questions