摘要:
基础代码 # 导包 from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from sele 阅读全文
摘要:
# 导包 from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium. 阅读全文
摘要:
这里需要百度的热点新闻标题 是多个元素 # 导包 from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDrive 阅读全文
摘要:
阅读全文
摘要:
代码 定位到元素后打印出文字 def get_text(self): element=driver.find_element(By.CSS_SELECTOR, "#sidebar_bh [href*='vip']") print(element.text) 阅读全文
摘要:
html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>CSS1</title> </head> <body> <div id='div1'> <div id='div2' > <P>这是段落1</p> < 阅读全文
摘要:
element = driver.find_element(By.CSS_SELECTOR, "#div2 input[type='text']") element.send_keys('myname') 阅读全文
摘要:
# 导包 from selenium import webdriver from selenium.webdriver.common.by import By from time import sleep from selenium.webdriver.support.ui import WebDr 阅读全文
摘要:
# 导包 from selenium import webdriver from selenium.webdriver.common.by import By from time import sleep from selenium.webdriver.support.ui import WebDr 阅读全文
摘要:
# 导入包 from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium 阅读全文