appium学习笔记之——popupwindow控件元素无法定位

时间:2019-01-18 19:27:30   收藏:0   阅读:841

在自学appium实践过程中,遇到了以下这样的问题:

技术分享图片

 

【发帖】元素明明存在,但却无法定位。无法聚焦在其控件上。。。。。明明悬浮在这个页面activity上。。。。。。

用uiautomatorviewer.bat定位不了元素,只能选择popupwindow下面一层的元素。遇到这种问题怎么办????不要慌张,让开发人员增加以下红色部分代码即可解决问题:

View contentView = LayoutInflater.from(mContext).inflate(
                R.layout.pop_window, null);
contentView.setFocusable(true);

 

原文:https://www.cnblogs.com/xqq-admin-content/p/10288983.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!