【发布时间】:2017-10-17 09:30:26
【问题描述】:
我在机器人框架脚本中遇到以下错误。
InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression //ul[@id='xyz-ul']/li[contains(text(),'Épargne en vue d\'un objectif précis')] because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//ul[@id='xyzul']/li[contains(text(),'Épargne en vue d\'un objectif précis')]' is not a valid XPath expression.
我正在尝试从 excel 中获取法语数据 "Épargne en vue d'un objectif précis" 并传入 xpath 以识别和单击元素。
该元素是一个下拉菜单。这是场景之一。我还有很多其他这样的场景都失败了。有人可以帮忙解决这个问题吗?
【问题讨论】:
标签: xpath robotframework dropdown