This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
3 / 3
Feb 2019

I am using appium1.4.13 and ios platform. Here is my test scenario. The contacts are listed in a table as cells. The contact in every cell can be swiped to left and then a delete button appears. The delete button can be found by appium, but error occurs when trying to click on it. I'm sure the button is visible on the screen after swiping. I don't know why deleteBtnE.isDisplayed() is false even after waiting for some time.
Could someone do me a favor on this? It blocks testing delete feature. Thanks.
Code:
WebElement tableCellE = driver.findElements(By.className(xxx)).get(5);
int y = tableCellE.getLocation().getY();
int width = driver.manage().window().getSize().width;
driver.swipe(width * 3 / 4, y, width / 2, y, 1000);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
deleteBtnE = driver.findElement(By.xpath(pf.deleteBtnXpath));
System.out.println("is displayed? " + deleteBtnE.isDisplayed() + ===X==="+deleteBtnE.getLocation().getX()+"===Y==="+deleteBtnE.getLocation().getY());

Output:
is displayed? false===X===307===Y===373

org.openqa.selenium.WebDriverException: An error occurred while executing user supplied JavaScript. (WARNING: The server did not provide any stacktrace information)

  • created

    Apr '16
  • last reply

    Feb '19
  • 2

    replies

  • 1.0k

    views

  • 3

    users

  • 1

    like

  • 1

    link

2 months later
2 years later