diff --git a/src/main/java/com/seleniumtests/browserfactory/AndroidDriverFactory.java b/src/main/java/com/seleniumtests/browserfactory/AndroidDriverFactory.java index 13e8520..3bc1ea1 100644 --- a/src/main/java/com/seleniumtests/browserfactory/AndroidDriverFactory.java +++ b/src/main/java/com/seleniumtests/browserfactory/AndroidDriverFactory.java @@ -26,6 +26,7 @@ import com.seleniumtests.driver.DriverConfig; import io.appium.java_client.android.AndroidDriver; +import org.openqa.selenium.WebDriverException; /** * AndroidDriverFactory. @@ -60,7 +61,7 @@ public WebDriver createWebDriver() throws IOException { protected void setPageLoadTimeout(final long timeout) { try { driver.manage().timeouts().pageLoadTimeout(timeout, TimeUnit.SECONDS); - } catch (UnsupportedCommandException e) { + } catch (WebDriverException e) { } } diff --git a/testng.xml b/testng.xml index a25c07b..75fa87f 100755 --- a/testng.xml +++ b/testng.xml @@ -88,7 +88,7 @@ + Set the property "app" to "Chrome" to run test on chrome browser on android device instead of default Browser-->