I am using appium 1.3.1. I wrote a test script using the java for IOS application & uses two @test Annotation with priority.But after the successful completion of one of the Test the execution get stop. Here is the code :
@Test(priority=1) public void test1() throws Exception{ driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[2]/UIAButton[3]")).click(); driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[2]/UIAButton[4]")).click(); System.out.println("ABC"); } @Test(priority=2) public void test2() throws Exception{ driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[2]/UIATableView[1]/UIATableCell[1]/UIASwitch[1]")).click(); driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[2]/UIATableView[1]/UIATableCell[2]/UIASwitch[1]")).click(); driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[2]/UIATableView[1]/UIATableCell[3]/UIASwitch[1]")).click(); System.out.println("XYZ"); }
Aucun commentaire:
Enregistrer un commentaire