【发布时间】:2019-02-22 11:17:41
【问题描述】:
if link : l = link.get_attribute("href") print (l) button=self.driver.find_element_by_xpath( "//button[@id = 'refuse-alert-button' and @data-record " in l +"]")
bug ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// \frontend.py",第 233 行,在reject_record "//button[@id = 'refuse-alert-button' and @data-record "in l +"]")
【问题讨论】:
-
这听起来像是X-Y problem。与其寻求解决问题的帮助,不如编辑您的问题并询问实际问题。你想做什么?
-
请尝试更合理地格式化您的问题。
-
XPath "in" operator的可能重复
-
^ 根据链接的问题,
in运算符在 XPath 2.0 中可用。 Selenium 仅支持 XPath 1.0。可能还有另一种方法可以做到这一点。请编辑您的问题并添加更多详细信息,例如相关的 HTML 以及您要完成的任务。