Thanks for the response. My question is why the same android test case does not work for IOS app testing for the same app. I have provided a proper id for ios till it is not working.
Following Test case working for android
public void Setting() throws InterruptedException
{
try{
driver.findElement(By.id("com.hannainst.hannalab:id/btnSettings")).click();
Boolean iselementpresent = driver.findElementsByName("Last Calibration:").size() != 0;
Assert.assertTrue(iselementpresent,"Last Calibration:");
System.out.println("TC6 :-Setting screen proper");
} catch(Throwable e)
{
System.out.println("TC 6:-Test Case Failed");
}
}
Following Test case working for IOS
public void Test_Setting()
{
try{
driver.tap(1,9,6,1);
Boolean iselementpresent = driver.findElementsByName("Change View").size() != 0;
Assert.assertTrue(iselementpresent);
System.out.println("TC1:-Menu Drawer successfully opened");
driver.tap(1,134,526,1);
} catch(Throwable e)
{
System.out.println("TC1:-Menu Drawer doesnot successfully opened");
}
}