如何在没有识别的情况下点击标签
我有一个由 javascript 控制的开关“按钮”,其结构如下:
<span class="customSwitch">
<label tabindex="0" class="selected-option">Relative</label>
<label tabindex="0">Absolute</label>
</span>
并寻找一种使用量角器单击绝对标签的方法
I have a javascript controlled switch "button" with the following structure:
<span class="customSwitch">
<label tabindex="0" class="selected-option">Relative</label>
<label tabindex="0">Absolute</label>
</span>
And looking for a way to click on Absolute label with Protractor
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以用来解决此问题的另一种方法是为此标签创建自定义 XPath,如下所示
希望这有助于解决问题
Another method you can use to solve this issue is by creating a custom XPath for this label which will be like this
Hope this helps to resolve the issue