iOS/Android driver compatibility issue on a cross-platform testing
See original GitHub issueDescription
I’m using java-client 2.10 in my appium test framework, it’s working good on my environment both for ios and android native application testing, I can reuse almost all the basic method like below:
public static AppiumDriver driver;
public static void setUp() {
if (PLATFORM_NAME.equals("ios")){
driver = new IOSDriver(new URL(DRIVER_AGENT),capabilities);
}
if (PLATFORM_NAME.equals("android")){
driver = new AndroidDriver(new URL(DRIVER_AGENT),capabilities);
}
}
Then I can create some common method likes ‘click a object name’ for both ios and android
public static void clickObjectByName(final String ObjectName) {
driver.findElementByName(ObjectName).click();
}
However, the driver is not working when I upgraded Java-client to 3.4.0 it request to create separately ‘AndDriver’ and ‘iOSDRIVER’ instance, it means that the common methods which I setup in above example could not be reuse again, and I need to setup 2 different test framework for ios and android.
So I think current Java-Client is not friendly for the cross-platform compatibility. can we make some updates?
And I found several people have the same query, here is the link: https://discuss.appium.io/t/ios-android-driver-casting-on-a-shared-test-code-base/1095
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (12 by maintainers)
Top GitHub Comments
seems to do the trick
Got it, thanks @rompic