python自动化未能正常定位

问题遇到的现象和发生背景

最近在学自动化,但是点击登录这个按钮运行不了

用代码块功能插入代码,请勿粘贴截图

//python代码

driver.implicitly_wait(20)
Denglu= driver.find_element(By.XPATH, "//button[@id=‘signin-submit-button’]")
# print(Sale)
Denglu.click()
//页面代码

运行结果及报错内容

selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression //button[@id=‘signin-submit-button’] because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//button[@id=‘signin-submit-button’]' is not a valid XPath expression.
(Session info: chrome=105.0.5195.127)

我的解答思路和尝试过的方法

使用了id、xpath等多个定位元素的方法,解释器始终定位不到

我想要达到的结果

能正常点击



//button[@id=‘signin-submit-button’]这个东西不是能够被识别的xpath。建议你使用Selenium IDE插件录制一下,然后把录到的路径放进去就可以了,很方便

不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^