简体   繁体   English

无法找到跨度元素

[英]Unable to locate span elements

I want to click the rename button and del button, but got below Exception 我想单击rename按钮和del按钮,但出现以下异常

Unable to locate element: {"method":"xpath","selector":"//*[@class="rename"]/span 1 "} 无法找到元素:{“方法”:“ xpath”,“选择器”:“ // * [@ class =” rename“] / span 1 ”}

@id is dynamic, so please not use the @id to locate. @id是动态的,因此请不要使用@id进行定位。

HTML: HTML: 在此处输入图片说明

Can anyone help me to figure out this problem? 谁能帮我解决这个问题?

Span is not a child element of element with class "rename" , but it is the element with class "rename" , so try Span不是元素为"rename"的元素的子元素,而是元素为"rename"的元素,因此请尝试

//span[@class="rename"]

and

//span[@class="del"]

to locate required elements 找到所需的元素

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM