Home > other >  How python automation landed after verification code errors in the operation of the repeated input a
How python automation landed after verification code errors in the operation of the repeated input a

Time:11-30



The import time

The from the selenium import webdriver
Import the rid_device_info_keyboard
From the time the import sleep
The from PIL import ImageGrab, Image






Def test_login (self) :


Driver=webdriver. Chrome ()

Self. Webobj. Driver. Maximize_window ()

Self. Webobj. Driver. The get (' https://www.baidu.com/')


Self.webobj.com mon_send_keys (" id ", "username", "15678865665")
Self.webobj.com mon_send_keys (" id ", "password", "123456")
Self.webobj.com mon_send_kes (" XPTH ", "//* [@ id=" TANGRAM__PSP_10__verifyCode "] ", "3456")

# click login
Self.webobj.com mon_click (' name ', 'submit')

Prompt verification code error, how in the automated self.webobj.com mon_send_keys (" id ", "username", "15678865665")
Self.webobj.com mon_send_keys (" id ", "password", "123456")
Self.webobj.com mon_send_kes (" XPTH ", "//* [@ id=" TANGRAM__PSP_10__verifyCode "] ", "3456")

# click login
Self.webobj.com mon_click (' name ', 'submit') this code?

CodePudding user response:

Until the login is successful

CodePudding user response:

Brother, solved?
  • Related