List of usage examples for org.openqa.selenium Platform ANDROID
Platform ANDROID
To view the source code for org.openqa.selenium Platform ANDROID.
Click Source Link
From source file:org.cerberus.serviceEngine.impl.SeleniumService.java
License:Open Source License
public DesiredCapabilities setCapabilityPlatform(DesiredCapabilities capabilities, String platform) throws CerberusException { if (platform.equalsIgnoreCase("WINDOWS")) { capabilities.setPlatform(Platform.WINDOWS); } else if (platform.equalsIgnoreCase("LINUX")) { capabilities.setPlatform(Platform.LINUX); } else if (platform.equalsIgnoreCase("ANDROID")) { capabilities.setPlatform(Platform.ANDROID); } else if (platform.equalsIgnoreCase("MAC")) { capabilities.setPlatform(Platform.MAC); } else if (platform.equalsIgnoreCase("UNIX")) { capabilities.setPlatform(Platform.UNIX); } else if (platform.equalsIgnoreCase("VISTA")) { capabilities.setPlatform(Platform.VISTA); } else if (platform.equalsIgnoreCase("WIN8")) { capabilities.setPlatform(Platform.WIN8); } else if (platform.equalsIgnoreCase("XP")) { capabilities.setPlatform(Platform.XP); } else {/* ww w .ja v a 2s . c o m*/ capabilities.setPlatform(Platform.ANY); } return capabilities; }
From source file:org.jitsi.meet.test.pageobjects.base.TestHint.java
License:Apache License
/** * On Android the {@link TestHint}'s key is defined in * the react-native's 'accessibilityLabel', but on iOS the react-native's * 'testID' attribute is used. That's because 'testID' does not work as * expected on Android and the 'accessibilityLabel' works in a different way * on iOS than on Android.../* w ww. j av a2s . co m*/ * * @return {@code true} if {@link TestHint} should be located by * the accessibility id or {@code false} if the id based search should be * used. */ private boolean useAccessibilityForId() { Platform driversPlatform = driver.getCapabilities().getPlatform(); // FIXME This looks like a bug, but I don't want to deal with this right // now. // Not sure if it's only when running appium from source or does it // sometimes report Android as LINUX platform. Also iOS is translated to // MAC ??? return driversPlatform.is(Platform.ANDROID) || driversPlatform.is(Platform.LINUX); }