摘要:
python+selenium十三:破解簡單的圖形驗證碼 此方法可破解簡單的驗證碼,如: 注:中文識別正在尋找辦法 安裝: 1、python3 2、Pillow 3、pytesseract 4、tesseract-ocr 下載地址:https://pan.baidu.com/s/1kXIsg1S9C 閱讀全文
posted @ 2018-11-21 23:40
怪圣卡杰
閱讀(627)
評論(0)
推薦(0)
摘要:
python+selenium十二:一個輸入框雙層input標簽 先點擊第一個,再對第二個進行操作,否則操作失敗 driver.find_element_by_css_selector(".pwd").click()driver.find_element_by_css_selector(".pass 閱讀全文
posted @ 2018-11-21 23:38
怪圣卡杰
閱讀(345)
評論(0)
推薦(0)
摘要:
python+selenium十:基于原生selenium的二次封裝 from selenium import webdriverfrom selenium.webdriver.support.wait import WebDriverWaitfrom selenium.webdriver.supp 閱讀全文
posted @ 2018-11-21 23:37
怪圣卡杰
閱讀(2016)
評論(0)
推薦(0)
摘要:
python+selenium十一:jQuery和js語法、js處理iframe selenium 執(zhí)行jQuery/js語法 driver.execute_script(jQuery/js) 1、jQuery jQuery只支持css語法: jquery = '$(CSS).val("XXX"); 閱讀全文
posted @ 2018-11-21 23:36
怪圣卡杰
閱讀(362)
評論(0)
推薦(0)
摘要:
python+selenium八:Alert彈窗 # 此彈窗是瀏覽器自帶的彈窗,不是html中的元素 from selenium import webdriverfrom selenium.webdriver.common.action_chains import ActionChainsimpor 閱讀全文
posted @ 2018-11-21 23:35
怪圣卡杰
閱讀(266)
評論(0)
推薦(0)
摘要:
python+selenium九:ddt數(shù)據(jù)驅(qū)動 讀取excel內(nèi)容 import xlrdclass ExcelUtil(): def __init__(self, excelPath, sheetName): #def __init__(self, excelPath, sheetName): 閱讀全文
posted @ 2018-11-21 23:35
怪圣卡杰
閱讀(375)
評論(0)
推薦(0)
摘要:
python+selenium六:隱式等待 # 隱式等待# 全局生效,只寫一次即可(僅當前頁面)# 若有頁面切換,需sleep等待新頁面出現(xiàn)后,再使用此方法# 如:在35秒內(nèi),等待操作完成,完成后,不再等待# driver.implicitly_wait(35)from selenium impor 閱讀全文
posted @ 2018-11-21 23:34
怪圣卡杰
閱讀(351)
評論(0)
推薦(0)
摘要:
python+selenium七:下拉框、選項框、select用法 from selenium import webdriverfrom selenium.webdriver.common.action_chains import ActionChainsimport timedriver = we 閱讀全文
posted @ 2018-11-21 23:34
怪圣卡杰
閱讀(4502)
評論(0)
推薦(0)
摘要:
python+selenium四:iframe查看、定位、切換 1.查看iframe 1.Top Window:可直接定位 2.iframe#i:說明此元素在iframe上 3.iframe顯示為空:(id或name為空) 4.右邊這個看到是空的(2層iframe) from selenium im 閱讀全文
posted @ 2018-11-21 23:33
怪圣卡杰
閱讀(832)
評論(0)
推薦(0)
摘要:
python+selenium五:多窗口切換與獲取句柄 from selenium import webdriverfrom selenium.webdriver.common.by import Byimport timedriver = webdriver.Firefox()driver.get 閱讀全文
posted @ 2018-11-21 23:33
怪圣卡杰
閱讀(498)
評論(0)
推薦(0)
摘要:
python+selenium三:鼠標事件與鍵盤事件 # 1、鼠標事件:# 每個模擬事件后需加.perform() 才會執(zhí)行# context_click() 右擊# double_click() 雙擊# drag_and_drop(source, target) 拖動# move_to_eleme 閱讀全文
posted @ 2018-11-21 23:32
怪圣卡杰
閱讀(518)
評論(0)
推薦(0)
摘要:
python+selenium二:定位方式 # 八種單數(shù)定位方式:elementfrom selenium import webdriverimport timedriver = webdriver.Firefox()time.sleep(2) # 等待2秒driver.get('https://w 閱讀全文
posted @ 2018-11-21 23:31
怪圣卡杰
閱讀(308)
評論(0)
推薦(0)
摘要:
# 1.打開Firefox瀏覽器 from selenium import webdriverdriver = webdriver.Firefox()driver.get("https://www.baidu.com") # 2.打開Ie或Chrome瀏覽器-->先將驅(qū)動文件放到python根目錄 閱讀全文
posted @ 2018-11-21 23:30
怪圣卡杰
閱讀(318)
評論(0)
推薦(0)
浙公網(wǎng)安備 33010602011771號