我想逐个自动删除此列表,但使用for循环会给我带来错误。
这是我的代码。
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome('D:\webdriver\chromedriver')
driver.get('https://www.google.com')
sleep(3)
search_query = driver.find_element_by_name('q')
subjectlist=["Acsys Inc",
"Customs Service Of Republic Of Armenia",
"National Security Service Under Government Of Ra",
"Aeropuerto Internacional Reina Beatrix",
"Algeme Ziektekosten Verzekering",
"Algemene",
"Algemene Ziektenkosten Verzekering",
"Centrale Bank Aruba",
"Didata Ny Warehouse"
]
for i in subjectlist:
search_query.send_keys(subjectlist[0])
list = driver.find_elements_by_tag_name('cite')