Python 使用selenium进行robot测试,如果Xpath中有特殊字符,则Xpath找不到元素

Python 使用selenium进行robot测试,如果Xpath中有特殊字符,则Xpath找不到元素,python,automated-tests,robotframework,Python,Automated Tests,Robotframework,当我们用法语运行robot测试用例时,会出现以下错误,但它在英语中运行相同的测试用例 InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression //span[contains(@class, 'v-button-caption')and text()=Options de sélection] because of the following

当我们用法语运行robot测试用例时,会出现以下错误,但它在英语中运行相同的测试用例

InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression //span[contains(@class, 'v-button-caption')and text()=Options de sélection] because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//span[contains(@class, 'v-button-caption')and text()=Options de sélection]' is not a valid XPath expression.

运行windows计算机时,也更改了文件的EOL(UTF-8,基于unix),但不工作

在更改“”中包含的和text()=“选项取消选择”(引号)后,此选项起作用