appium / appium

Cross-platform automation framework for all kinds of apps, built on top of the W3C WebDriver protocol
http://appium.io/
Apache License 2.0
18.66k stars 6.05k forks source link

Cannot find elements when the selector is null. #11168

Closed CPPAlien closed 6 years ago

CPPAlien commented 6 years ago

The problem

When I use findElement, I encountered the error below.

java.lang.IllegalArgumentException: Cannot find elements when the selector is null.
    at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:314)
    at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:62)
    at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
    at io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:363)
    at io.appium.java_client.DefaultGenericMobileDriver.findElementById(DefaultGenericMobileDriver.java:70)
    at io.appium.java_client.AppiumDriver.findElementById(AppiumDriver.java:1)
    at io.appium.java_client.android.AndroidDriver.findElementById(AndroidDriver.java:1)
    at com.qunhe.avocado.lib.Avocado.tap(Avocado.java:53)
    at com.qunhe.avocado.steps.MyStepdefs.tap(MyStepdefs.java:48)
    at ✽.tap "OK"(/Users/qunhe/IDEA/KoolTest/src/test/features/xigua.feature:3)

Environment

Link to Appium logs

https://gist.github.com/CPPAlien/3f9bfb849fe8033293ec6dcbc11d4022

mykola-mokhnach commented 6 years ago

This looks like a problem with the client code. I don't observe any issues in the attached log

imurchie commented 6 years ago

There is also no indication of a find element call ever getting to the server.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.