【发布时间】:2019-10-22 00:45:13
【问题描述】:
我想点击这个按钮,但我的代码不起作用。
我尝试的最后一个是:driver.find_element_by_xpath("/html/body/app/main/app/div/div/e-arsiv/taslaklar/div[2]/div/div/div[2]/uc-quick-filter[@type='3M]").click()
我得到这个错误:
elenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression /html/body/app/main/app/div/div/e-arsiv/taslaklar/div[2]/div/div/div[2]/uc-quick-filter[@type='3M] because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '/html/body/app/main/app/div/div/e-arsiv/taslaklar/div[2]/div/div/div[2]/uc-quick-filter[@type='3M]' is not a valid XPath expression.
这里是html
【问题讨论】:
标签: python python-3.x selenium xpath selenium-chromedriver