I am not able to execute the whole script. Right now my script runs for @BeforeTest annotation, not running for @Test and @AfterTest.
Even when I run from testng.xml the script is still not running fully.
Let me know where I am mistaken.
public class LaunchApp {
WebDriver driver = null;
@BeforeTest
public void setup() throws InterruptedException{
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("appium-version", "1.4.13.1");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("platformVersion", "5.0.2");
capabilities.setCapability("deviceName", "CC55EYG01397");
capabilities.setCapability("app", "E:\\build_1026.apk");
try {
driver = new RemoteWebDriver(
new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
} catch (MalformedURLException e) {
e.printStackTrace();
}
driver.manage().timeouts().implicitlyWait(80, TimeUnit.SECONDS);
}
@Test
public void appiumExampleTest() throws Exception {
WebElement phNo = driver.findElement(By.id("editTextFirst"));
phNo.sendKeys("99999999");
driver.findElement(By.id("textViewContinue"));
}
@AfterTest
public void tearDown() {
if (driver != null) {
driver.quit();
}
}
}