【发布时间】:2020-10-01 19:26:55
【问题描述】:
如果 XPath 包含法语特殊字符(è d'),似乎 XPath 不起作用,出现以下错误
InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression
//*[@class='v-menubar-menuitem']/*[contains(text(), 'Afficher la bibliothèque d'autorisations')]
because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document':
The string '//*[@class='v-menubar-menuitem']/*[contains(text(), 'Afficher la bibliothèque d'autorisations')]' is not a valid XPath expression.
运行 windows 机器,也为 File 更改了 EOL(UTF-8,基于 unix),但不工作。
当我们以英文本地化运行时,这很好用
【问题讨论】:
标签: xml python-2.7 xpath selenium-chromedriver robotframework