- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
无法通过此策略定位元素:定位器 map : - 原生内容:“By.xpath://android.widget.ImageView[id='toolbar_search_place']” - html 内容:“按 id 或名称“ClkSearchicon””
我添加了 XML:
<?xml version="1.0" encoding="UTF-8"?><hierarchy rotation="0"><android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][720,1184]" resource-id="" instance="0"><android.widget.LinearLayout index="0" text="" class="android.widget.LinearLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][720,1184]" resource-id="" instance="0"><android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][720,1184]" resource-id="" instance="1"><android.widget.LinearLayout index="0" text="" class="android.widget.LinearLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][720,1184]" resource-id="com.senrysa.veiculu:id/action_bar_root" instance="1"><android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][720,1184]" resource-id="android:id/content" instance="2"><android.support.v4.widget.DrawerLayout index="0" text="" class="android.support.v4.widget.DrawerLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][720,1184]" resource-id="com.senrysa.veiculu:id/drawer_layout" instance="0"><android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="" instance="3"><android.widget.RelativeLayout index="0" text="" class="android.widget.RelativeLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="com.senrysa.veiculu:id/frame_container1" instance="0"><android.widget.LinearLayout index="0" text="" class="android.widget.LinearLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="" instance="2"><android.widget.LinearLayout NAF="true" index="0" text="" class="android.widget.LinearLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,904][720,1184]" resource-id="com.senrysa.veiculu:id/ll_radious" instance="3"><android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,904][720,1184]" resource-id="" instance="4"><android.widget.SeekBar index="0" text="" class="android.widget.SeekBar" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,904][720,1028]" resource-id="com.senrysa.veiculu:id/range" instance="0"/><android.widget.LinearLayout index="1" text="" class="android.widget.LinearLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,1044][720,1184]" resource-id="" instance="4"><android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,1044][132,1164]" resource-id="" instance="5"><android.widget.ImageView index="0" text="" class="android.widget.ImageView" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[6,1044][126,1164]" resource-id="com.senrysa.veiculu:id/rd_seltct_marker_one" instance="0"/></android.widget.FrameLayout><android.view.View index="1" text="" class="android.view.View" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[132,1044][150,1184]" resource-id="" instance="0"/><android.widget.FrameLayout index="2" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[150,1044][282,1164]" resource-id="" instance="6"><android.widget.ImageView NAF="true" index="0" text="" class="android.widget.ImageView" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[156,1044][276,1164]" resource-id="com.senrysa.veiculu:id/rd_marker_two" instance="1"/></android.widget.FrameLayout><android.view.View index="3" text="" class="android.view.View" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[282,1044][300,1184]" resource-id="" instance="1"/><android.widget.FrameLayout index="4" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[300,1044][432,1164]" resource-id="" instance="7"><android.widget.ImageView NAF="true" index="0" text="" class="android.widget.ImageView" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[306,1044][426,1164]" resource-id="com.senrysa.veiculu:id/rd_marker_three" instance="2"/></android.widget.FrameLayout><android.view.View index="5" text="" class="android.view.View" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[432,1044][450,1184]" resource-id="" instance="2"/><android.widget.FrameLayout index="6" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[450,1044][582,1164]" resource-id="" instance="8"><android.widget.ImageView NAF="true" index="0" text="" class="android.widget.ImageView" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[456,1044][576,1164]" resource-id="com.senrysa.veiculu:id/rd_marker_four" instance="3"/></android.widget.FrameLayout><android.view.View index="7" text="" class="android.view.View" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[582,1044][600,1184]" resource-id="" instance="3"/><android.widget.FrameLayout index="8" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[600,1044][720,1164]" resource-id="" instance="9"><android.widget.ImageView NAF="true" index="0" text="" class="android.widget.ImageView" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[600,1044][720,1164]" resource-id="com.senrysa.veiculu:id/rd_marker_five" instance="4"/></android.widget.FrameLayout></android.widget.LinearLayout></android.widget.FrameLayout></android.widget.LinearLayout></android.widget.LinearLayout></android.widget.RelativeLayout><android.widget.RelativeLayout index="1" text="" class="android.widget.RelativeLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="com.senrysa.veiculu:id/frame_container" instance="1"><android.widget.RelativeLayout index="0" text="" class="android.widget.RelativeLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="" instance="2"><android.widget.RelativeLayout index="0" text="" class="android.widget.RelativeLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="" instance="3"><android.widget.LinearLayout index="0" text="" class="android.widget.LinearLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="com.senrysa.veiculu:id/rlUpperlayout" instance="5"><android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="" instance="10"><android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="com.senrysa.veiculu:id/mapView" instance="11"><android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="" instance="12"><android.widget.RelativeLayout index="0" text="" class="android.widget.RelativeLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="" instance="4"><android.widget.ImageView index="0" text="" class="android.widget.ImageView" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[10,1130][130,1174]" resource-id="" instance="5"/></android.widget.RelativeLayout><android.view.View index="1" text="" class="android.view.View" package="com.senrysa.veiculu" content-desc="Google Map" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="" instance="4"><android.view.View index="0" text="" class="android.view.View" package="com.senrysa.veiculu" content-desc="0." checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[256,676][336,776]" resource-id="" instance="5"/></android.view.View><android.widget.RelativeLayout index="2" text="" class="android.widget.RelativeLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,1184]" resource-id="" instance="5"/></android.widget.FrameLayout></android.widget.FrameLayout><android.widget.LinearLayout index="1" text="" class="android.widget.LinearLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[312,508][408,604]" resource-id="com.senrysa.veiculu:id/locationMarker" instance="6"><android.widget.ImageView index="0" text="" class="android.widget.ImageView" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[312,508][408,604]" resource-id="com.senrysa.veiculu:id/imageView_center" instance="6"/></android.widget.LinearLayout><android.widget.ImageButton index="2" text="" class="android.widget.ImageButton" package="com.senrysa.veiculu" content-desc="My Location" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[648,580][720,652]" resource-id="com.senrysa.veiculu:id/myMapLocationButton" instance="0"/></android.widget.FrameLayout></android.widget.LinearLayout></android.widget.RelativeLayout></android.widget.RelativeLayout></android.widget.RelativeLayout><android.view.ViewGroup index="2" text="" class="android.view.ViewGroup" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][720,160]" resource-id="com.senrysa.veiculu:id/toolbar" instance="0"><android.widget.ImageButton index="0" text="" class="android.widget.ImageButton" package="com.senrysa.veiculu" content-desc="Navigate up" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,48][112,160]" resource-id="" instance="1"/><android.widget.LinearLayout index="1" text="" class="android.widget.LinearLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[112,49][720,159]" resource-id="" instance="7"><android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[112,49][720,159]" resource-id="" instance="13"><android.widget.FrameLayout index="0" text="" class="android.widget.FrameLayout" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[480,49][720,159]" resource-id="" instance="14"><android.widget.ImageView NAF="true" index="0" text="" class="android.widget.ImageView" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[490,59][580,149]" resource-id="com.senrysa.veiculu:id/toolbar_search_place" instance="7"/><android.widget.ImageView NAF="true" index="1" text="" class="android.widget.ImageView" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[620,59][710,149]" resource-id="com.senrysa.veiculu:id/btn_filter1" instance="8"/></android.widget.FrameLayout></android.widget.FrameLayout></android.widget.LinearLayout></android.view.ViewGroup></android.widget.FrameLayout></android.support.v4.widget.DrawerLayout></android.widget.FrameLayout></android.widget.LinearLayout></android.widget.FrameLayout></android.widget.LinearLayout><android.view.View index="1" text="" class="android.view.View" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][720,48]" resource-id="android:id/statusBarBackground" instance="6"/><android.view.View index="2" text="" class="android.view.View" package="com.senrysa.veiculu" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,1184][720,1280]" resource-id="android:id/navigationBarBackground" instance="7"/></android.widget.FrameLayout></hierarchy>
最佳答案
如果您仅通过 ID 值查找,正确的解决方案应如下: By.id("toolbar_search_place")
如果您使用resource-id
属性,那么您必须匹配页面元素 XML 中的精确值,例如By.xpath("//android.widget.ImageView[@resource-id='<resource_id_value>']")
注意! resource-id
=/= id
更新!
因此,在这个特定的 XML 情况下,您的 xpath 应如下所示:
By.xpath("//android.widget.ImageView[@resource-id='com.senrysa.veiculu:id/toolbar_search_place']")
有关 XPath 的更多信息:W3schools XML and XPath
关于java - 如何修复 "Can' t 通过此策略定位元素 : Locator map:",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40418628/
作者:小林coding 计算机八股文网站:https://xiaolincoding.com 大家好,我是小林。 今天跟大家聊聊,常见的缓存更新策略。 Cache Aside(旁路缓存)策略; Rea
我使用 git 多年,最近为了一个项目改用 mercurial。在过去的 6 个月里,我已经学会了如何通过命令行很好地使用 Mercurial。 这可能是我的想象,但在我看来,mercurial 在
这个问题适合任何熟悉的人 Node.js express Passport 带有 Passport 的 JWT 身份验证(JSON Web token ) Facebook OAuth2.0 或谷歌
在 Coq 中,当试图证明记录的相等性时,是否有一种策略可以将其分解为所有字段的相等性?例如, Record R := {x:nat;y:nat}. Variables a b c d : nat.
我正在处理的项目目前只有一个 Bootstrap 文件,用于初始化应用程序中的所有 javascript 对象。类似于下面的代码 if(document.getElementById('nav'))
我正在考虑使用 OpenLDAP 在首次登录时添加密码到期和强制更改密码。 似乎使用 ppolicy 覆盖来实现这一点。 当我在 ppolicy.schema 中看到这个时,我开始使用 ppolicy
这基本上是我昨天问的一个问题的重新陈述,因为我得到的一个答案似乎没有理解我的问题,所以我一定是不清楚。我的错。 因为 WPF 依赖于 DirectX,所以它对卡和驱动程序的内部非常敏感。我有一个案例,
我是单点登录(SSO)概念的新手。我开始知道 SAML 请求和响应是实现 SSO 流程的最佳方式。然后我开始阅读有关 SAML2.0 的信息。我来了一个术语 NameIdPolicy 在 saml1.
关闭。这个问题需要更多 focused .它目前不接受答案。 想改进这个问题?更新问题,使其仅关注一个问题 editing this post . 5年前关闭。 Improve this questi
关闭。这个问题是opinion-based 。目前不接受答案。 想要改进这个问题吗?更新问题,以便 editing this post 可以用事实和引文来回答它。 . 已关闭 9 年前。 Improv
在 Azure 上创建新的 SQL 数据库时,它将“计算+存储”选项设置为“2 vCore + 32GB 数据最大大小”作为默认配置,但我不想使用 vCore,我可以更改它。但问题是,是否可以通过策略
我希望创建一项策略,防止在未启用身份验证的情况下创建应用服务(仅审核它们是不够的)。 以下策略可以正确识别未启用身份验证的现有资源: { "mode": "All", "policyRule"
我正在尝试从现有 AuditIfNotExists 策略创建 DeployIfNotExists 策略。部署时不会出错,但会错误提示“没有相关资源与策略定义中的效果详细信息匹配”。当评估政策时。当我将
我正在尝试从现有 AuditIfNotExists 策略创建 DeployIfNotExists 策略。部署时不会出错,但会错误提示“没有相关资源与策略定义中的效果详细信息匹配”。当评估政策时。当我将
我正在使用 wunderground 的 json api 来查询我网站上的天气状况。 api 为我提供了一个包含所有必要数据的漂亮 json 对象,但我每天只能进行多次调用。存储这些数据的首选方式是
我有一个名为可视化数据结构的项目。我有这样的 OOP 设计。 Class VisualDataStructures extends JFrame Class ControlPanel extends
这个问题在这里已经有了答案: 关闭 14 年前。 副本: Use javascript to inject script references as needed? Javascript 没有任何指
Android 应用程序遇到了一些 ANR 问题,因此我实现了 StrictMode 策略。以前从未使用过这个,所以希望有人可以帮助解释以下内容: 为什么日志显示 2 个看似相似的违规行为,除了前 4
我目前正在尝试解决一个问题。假设我们在路上行驶,我们知道路上有 10 家酒店。每家酒店都有 0 到 6 星。我的问题是:找到选择星级酒店的最佳解决方案。唯一的问题是:您不能回头去参观您已经决定不去的酒
我正在将我的应用程序迁移到 MVP。从这个 konmik 中获得了有关静态演示者模式的提示 这是我的简要 MVP 策略。为简洁起见,删除了大部分样板和 MVP 监听器。这个策略帮助我改变了方向,证明了
我是一名优秀的程序员,十分优秀!