Appium: “An element could not be located on the page using the given search parameters” error

后端 未结 3 1682
遥遥无期
遥遥无期 2021-01-11 17:13

I am new to Appium and have been trying to automate the Conversion Calculator app for Android. Am getting the error \"org.openqa.selenium.NoSuchElementException: An element

3条回答
  •  -上瘾入骨i
    2021-01-11 17:58

    Possible Cause:

    • Multiple EditText in the current screen.

    Please try with the following:

    Solution1:

    List editText = driver.findElements(By.className("android.widget.EditText"));
    editText.get(0).sendKeys("123");
    

    0 - Index of EditText

    Solution2:

    Use any other locating strategy like Xpath.

提交回复
热议问题