paypal/SeLion

No support for appium MobileBy locator types. Cannot find mobile elements by accessibility id.

Opened this issue · 1 comments

SeLion Version

2.0.0-SNAPSHOT

Component

SeLion & SeLion-appium-provider

Expected Behavior

SeLion platform WebElements to be located via appium MobileBy types.

Actual Behavior

SeLion platform WebElements cannot be located by appium MobileBy types.

Steps to Reproduce

The bridge drivers allows findElementBy(By by) override, however limitation still exists on the set of By subclasses that can be passed in. HtmlElementUtils.resolveByType(String locator) cannot be overridden.

https://github.com/paypal/SeLion/blob/develop/client/src/main/java/com/paypal/selion/platform/mobile/ios/UIAElement.java#L67
https://github.com/paypal/SeLion/blob/develop/client/src/main/java/com/paypal/selion/platform/mobile/android/UiObject.java#L50

Proposal:

  1. Add By resolveByType(String locator); method definition in SeLionAndroidBridgeDriver and SeLionIOSBridgeDriver

  2. Appium ios/android providers can resolve MobileBy types in addition to using existing HtmlElementUtils.

  3. Other providers can continue leveraging HtmlElementUtils.

mach6 commented

@elhuang Thanks for filing this. I love it when an issue is submitted with a proposal -- even more when it is followed up with a PR. :)