【发布时间】:2016-09-29 07:02:30
【问题描述】:
我需要在我的 xpath 表达式中使用撇号 ('),我需要在使用 webdriver 查找元素时使用它
我需要使用下面的Xpath表达式
//input[@text="WE'd like to hear from you"]
在查找元素函数中使用上述表达式时,我将双引号替换为单引号
driver.findelements(By.xpath("//input[@text='WE'd like to hear from you']"))
【问题讨论】: