如何允许所有第三方在chrome中使用javascript或python



是否可以使用javascript或python执行以下操作?

在url框中输入此项。chrome://settings/cookies

在cookie和其他网站数据中->常规设置->允许所有cookie

Ypu can do something like this. Just need to find out exact xapth element.
from selenium import webdriver
import time
driver = webdriver.Chrome(executable_path='C:\temp\chromedriver.exe')
driver.get('chrome://settings/cookies')
time.sleep(3)
driver.find_element_by_xpath("<xpath locator>").click()

最新更新