简体   繁体   English

Android Hybrid App-Chrome检查Xpath无法使用Java查找

[英]Android Hybrid App - Chrome inspect Xpath unable to find using Java

I'm very new to Android Application Testing. 我是Android应用程序测试的新手。 I started testing on a Hybrid Apps , After login page I want to capture few xpath and values of some specific elements. 我开始在Hybrid Apps上进行测试,登录页面后,我想捕获一些特定的元素的xpath和值。 I used chrome inspector to find xpath of few elements. 我使用chrome inspector查找了一些元素的xpath。 When I used the same xpath in my java code it's not finding it. 当我在Java代码中使用相同的xpath时,找不到它。 Size of xpath is showing as Zero. xpath的大小显示为零。

I have already used Thread.sleep , element wait. 我已经使用过Thread.sleep,元素等待。 I'm using the same xpath which I got from chrome inspector - Copyxpath feature. 我正在使用从chrome inspector获得的相同xpath-Copyxpath功能。

Please help me how to verify if any frame or layout present in the application. 请帮助我如何验证应用程序中是否存在任何框架或布局。 I have attached HTML and my code, Added my new screen shot. 我已经附加了HTML和代码,并添加了新的屏幕截图。

Updated Screen Shot 更新了屏幕截图

[1]: https://i.stack.imgur .com/mvG6s.png [1]:https: //i.stack.imgur.com/mvG6s.png

Based on the screenshot, and the assumption that the arrow points from the line of code that fails to the HTML code it is supposed to match-up with, you have an incorrect XPath. 根据屏幕截图,并假设箭头从失败的代码行指向应该与之匹配的HTML代码,您有一个不正确的XPath。 It goes from ion-side-menu-content to ion-tabs which does not match the highlighted line in the HTML code which instead goes to ion-header-bar . 它从ion-side-menu-contention-tabs ,与HTML代码中突出显示的行不匹配,而HTML代码改为ion-header-bar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法通过 Chrome://inspect 检查 Android 设备 - Unable to inspect Android device via Chrome://inspect Chrome 远程调试 - 如何检查混合应用程序中的元素(webview) - Chrome Remote Debugging - how to inspect elements in hybrid app (webview) 错误:无法捕获屏幕截图-使用量角器和Appium的Android混合应用 - Error: Unable to capture screenshot - Android hybrid app using Protractor and Appium Chrome检查设备未显示android应用 - Chrome Inspect Device not showing android app 如何使用Chrome浏览器检查Android设备? - How to inspect the Android device using chrome? Appium:无法在Android混合应用中使用Xpath定位元素? - Appium: An element could not be located using Xpath in android hybrid apps? IBM Worklight 6.0 - 无法在avd上使用dojo toolkit for android环境运行示例混合工作灯应用程序? - IBM Worklight 6.0 - Unable to run sample hybrid worklight app using dojo toolkit for android environment on avd? 无法在 chrome 远程调试上检查 android 应用程序 - Can't inspect android app on chrome remote debug 我可以检查任何应用程序的布局以找出它们在 Android 设备上使用的组件吗? - Can I inspect any app's layout to find out which components they are using on Android device? 带有IONIC框架的Calabash android混合应用程序。 无法访问元素 - Calabash android hybrid app with IONIC framework. unable to access elements
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM