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

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

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

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

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

猜你喜欢

转载自www.cnblogs.com/xqq-admin-content/p/10288983.html