
import time
from selenium import webdriver
import keyboard
from time import sleep
from PIL import ImageGrab, Image
def test_login(self):
driver = webdriver.Chrome()
self.webobj.driver.maximize_window()
self.webobj.driver.get('https://www.baidu.com/')
self.webobj.common_send_keys("id", "username", "15678865665")
self.webobj.common_send_keys("id","password","123456")
self.webobj.common_send_kes("xpth","//*[@id="TANGRAM__PSP_10__verifyCode"]","3456")
# 點擊登錄
self.webobj.common_click('name','submit')
提示驗證碼錯誤,怎么樣才能在自動執行 self.webobj.common_send_keys("id", "username", "15678865665")
self.webobj.common_send_keys("id","password","123456")
self.webobj.common_send_kes("xpth","//*[@id="TANGRAM__PSP_10__verifyCode"]","3456")
# 點擊登錄
self.webobj.common_click('name','submit')這段代碼呢?
uj5u.com熱心網友回復:
直到登錄成功為止uj5u.com熱心網友回復:
老哥,解決了嗎?轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/26526.html
標籤:其他
