试试这个xpath(用代码块更新,所以网站删除了我的*)
//*[contains(concat(' ', @class, ' '), ' btns right ')]//*[contains(concat('', @class, ' '), ' expand-all ') and contains(text(), 'View All Cards')]提供一些等待元素可点击(建议隐式)。
我只用于java,但是我在这里引用了python ,这可能有帮助!
from selenium.webdriver.support import expected_conditions as ECwait = WebDriverWait(driver, 10)button = wait.until(EC.element_to_be_clickable((By.XPATH,'//*[contains(concat(' ', @class, ' '), ' btns right ')]//*[contains(concat(' ', @class, ' '), ' expand-all ') and contains(text(), 'View All Cards')]')))button.click()Even if the above thing fails, try this形成这些链接link1和link2
driver.execute_script("document.getElementsByClassName('expand-all')[0].click();")在所需元素上插入人工点击,删除(注释)所有其他代码
可能是您的应用属于link2 OP :)



