我试着接受所有基于id的cookie,但这不起作用,我能做什么呢?
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.service import Service
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(options=options)
driver.get("https://www.geocaching.com/play")
driver.maximize_window()
cookie_allow = driver.find_element(By.ID, "CybotCookiebotDialogBodyButtonAccept")
cookie_allow.click()
signin_link = driver.find_element(By.CLASS_NAME, "sign-in-link")
signin_link.click()这是html元素:html元素屏幕截图
发布于 2022-01-10 11:00:46
driver.find_element(By.LINK_TEXT, "Allow all")https://stackoverflow.com/questions/70641817
复制相似问题