我正在开发一个类似于Selenium的记录工具(在JavaScript中)。对于回放,我需要XPath位置及其属性(参见下面来自Selenium的屏幕截图)。
如何在JavaScript中找到位置和属性?

发布于 2018-10-04 17:15:24
您可以使用css选择器:
document.querySelector("li:nth-of-type(4) input[name='leg0']");或
document.querySelectorAll("li:nth-of-type(4) input[name='leg0']");https://stackoverflow.com/questions/52642841
复制相似问题