Search in sources :

Example 11 with AndroidCapabilitiesFactory

use of com.seleniumtests.browserfactory.AndroidCapabilitiesFactory in project seleniumRobot by bhecquet.

the class TestAndroidCapabilitiesFactory method testCreateCapabilitiesWithApplicationOverrideFullReset.

/**
 * Check mobile test with app
 */
@Test(groups = { "ut" })
public void testCreateCapabilitiesWithApplicationOverrideFullReset() {
    SeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());
    context.setMobilePlatformVersion("8.0");
    context.setPlatform("android");
    context.setDeviceName("Samsung Galasy S8");
    context.setAppPackage("appPackage");
    context.setAppActivity("appActivity");
    context.setFullReset(false);
    context.setApp("com.covea.mobileapp");
    DriverConfig config = new DriverConfig(context);
    AndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);
    MutableCapabilities capa = capaFactory.createCapabilities();
    Assert.assertEquals(capa.getCapability(MobileCapabilityType.FULL_RESET), false);
}
Also used : SeleniumTestsContext(com.seleniumtests.core.SeleniumTestsContext) MutableCapabilities(org.openqa.selenium.MutableCapabilities) DriverConfig(com.seleniumtests.driver.DriverConfig) AndroidCapabilitiesFactory(com.seleniumtests.browserfactory.AndroidCapabilitiesFactory) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Aggregations

GenericTest (com.seleniumtests.GenericTest)11 AndroidCapabilitiesFactory (com.seleniumtests.browserfactory.AndroidCapabilitiesFactory)11 SeleniumTestsContext (com.seleniumtests.core.SeleniumTestsContext)11 DriverConfig (com.seleniumtests.driver.DriverConfig)11 MutableCapabilities (org.openqa.selenium.MutableCapabilities)11 Test (org.testng.annotations.Test)11 File (java.io.File)1