无法使用Appium Android

时间:2016-02-19 16:12:25

标签: android appium

使用Appium for Android和app作为亚马逊,我无法在页面上找到任何元素。它给了我以下错误:

  

线程中的异常" main" org.openqa.selenium.NoSuchElementException:使用给定的搜索参数无法在页面上找到元素。 (警告:服务器未提供任何堆栈跟踪信息)   命令持续时间或超时:10.15秒   有关此错误的文档,请访问:http://seleniumhq.org/exceptions/no_such_element.html   构建信息:版本:' 2.44.0',修订版:' 76d78cf',时间:' 2014-10-23 20:03:00'   系统信息:主机:' poojal03',ip:' 192.168.56.1',os.name:' Windows 7',os.arch:' amd64',os.version:' 6.1',java.version:' 1.7.0_51'   会议ID:c8910730-dab7-43bc-a22f-53e4e3627885   驱动程序信息:org.openqa.selenium.remote.RemoteWebDriver   功能[{platform = LINUX,app = C:\ Users \ poojal \ Desktop \ com.amazon.mShop.android-5.5.0.200-5050002-minAPI9.apk,javascriptEnabled = true,appActivity = com.amazon.mShop.splashscreen。 StartupActivity,browserName =,networkConnectionEnabled = true,desired = {app = C:\ Users \ poojal \ Desktop \ com.amazon.mShop.android-5.5.0.200-5050002-minAPI9.apk,platformName = Android,deviceName = BX903GLKY4,browserName =,appActivity = com.amazon.mShop.splashscreen.StartupActivity,appPackage = com.amazon.mShop.android,version = 4.4.4},locationContextEnabled = false,appPackage = com.amazon.mShop.android,version = 4.4.4 ,platformVersion = 4.1,databaseEnabled = false,platformName = Android,deviceName = BX903GLKY4,webStorageEnabled = false,warnings = {},takesScreenshot = true}]       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)       at java.lang.reflect.Constructor.newInstance(Constructor.java:526)       在org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)       在org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)       在org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)       在org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:352)       在org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:393)       在org.openqa.selenium.By $ ById.findElement(By.java:214)       在org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:344)       在Amazon.main(Amazon.java:57)

1 个答案:

答案 0 :(得分:-1)

通过查看日志,它说出超时异常。如果各个页面花费很长时间加载或无效xpath,则会发生这种情况。如果您可以共享检查器/ uiautomatorviewer的截图以及您为元素编写的xpath,我可以提供直接答案