Here is my code:
Test(priority = 6)
public void validate_purchase_information() {
driver.switchTo().frame(driver.findElement(By.xpath("//[@class=‘android.widget.TableLayout’ and @index=‘0’]")));
String dateTitile = driver.findElement(By.id(“com.adda52.cashApp:id/lblDate”)).getText();
driver.switchTo().frame(driver.findElement(By.xpath("//[@class=‘android.widget.TableLayout’ and @index=‘1’]")));
String dateValue = driver.findElement(By.id(“com.adda52.cashApp:id/txtDate”)).getText();
System.out.println(dateTitile+" “+”= "+dateValue);
}
It gives me the following error:
org.openqa.selenium.WebDriverException: Not yet implemented. Please help us: http://appium.io/get-involved.html (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 38 milliseconds
Use it without switch , usually in native app’s switch is not required take example of native confirmation popup’s
we dont need to switch and then click OK button to accept them.
So try without switch just make sure u r locator is correct which ever element u read
One more thing to get the text or value of field you can also use