use of io.appium.java_client.pagefactory.AppiumFieldDecorator in project java-client by appium.
the class IOSMobileBrowserCompatibilityTest method setUp.
/**
* The setting up.
*/
@Before
public void setUp() {
service = AppiumDriverLocalService.buildDefaultService();
service.start();
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, MobileBrowserType.SAFARI);
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "9.2");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone Simulator");
// sometimes environment has performance problems
capabilities.setCapability(IOSMobileCapabilityType.LAUNCH_TIMEOUT, 500000);
driver = new IOSDriver<>(service.getUrl(), capabilities);
PageFactory.initElements(new AppiumFieldDecorator(driver, 5, TimeUnit.SECONDS), this);
}
use of io.appium.java_client.pagefactory.AppiumFieldDecorator in project java-client by appium.
the class DesktopBrowserCompatibilityTest method chromeTest.
@Test
public void chromeTest() {
WebDriver driver = new ChromeDriver();
try {
PageFactory.initElements(new AppiumFieldDecorator(driver, 15, TimeUnit.SECONDS), this);
driver.get(new File("src/test/java/io/appium/java_client/hello appium - saved page.htm").toURI().toString());
assertNotEquals(0, foundLinks.size());
assertNotEquals(0, main.size());
assertEquals(null, trap1);
assertEquals(null, trap2);
} finally {
driver.quit();
}
}
use of io.appium.java_client.pagefactory.AppiumFieldDecorator in project java-client by appium.
the class MobileBrowserCompatibilityTest method setUp.
/**
* The setting up.
*/
@Before
public void setUp() {
service = AppiumDriverLocalService.buildDefaultService();
service.start();
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Android Emulator");
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, MobileBrowserType.BROWSER);
driver = new AndroidDriver<RemoteWebElement>(service.getUrl(), capabilities);
// This time out is set because test can be run on slow Android SDK emulator
PageFactory.initElements(new AppiumFieldDecorator(driver, 5, TimeUnit.SECONDS), this);
}
use of io.appium.java_client.pagefactory.AppiumFieldDecorator in project java-client by appium.
the class TimeoutTest method setUp.
/**
* The setting up.
*/
@Before
public void setUp() {
setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, getChromeDriver().getAbsolutePath());
driver = new ChromeDriver();
timeOutDuration = new TimeOutDuration(DEFAULT_TIMEOUT, DEFAULT_TIMEUNIT);
initElements(new AppiumFieldDecorator(driver, timeOutDuration), this);
}
Aggregations