【发布时间】:2021-12-08 05:28:57
【问题描述】:
我已经自动将数字数组中的数字一一发送到文本框,如下所示,而数字是从数组中获取的,同时如何从电子邮件数组?
import time
numbers = [2589001,2589002,2589003,2589004,2589005,2589006,2589007,2589008,2589009,2589010]
email = ["mail1@gmail.com","mail2@gmail.com","mail3@gmail.com","mail4@gmail.com","mail5@gmail.com"]
def oo() :
for idx in email :
email_from_list = email[idx%len(email)]
#I want to put those email function code here and need to pass this def oo()
c = 0
def vs () :
for idx, nm in enumerate(numbers) :
#Number Input
WebDriverWait(browser, 2500).until(EC.presence_of_element_located((By.NAME, "Number"))).send_keys(nw)
time.sleep(1)
WebDriverWait(browser, 2500).until(EC.presence_of_element_located((By.NAME, "Number"))).send_keys(oo()) #<---- here need to call
time.sleep(1)
#I need code here to get email id one by one randomly from array <--- Fix you wording. You don't actually want them one by one randomly
w = 0
while w < 50 :
vs ()
w += 1
【问题讨论】:
-
这个问题不应该被标记为 selenium-chromedriver;它与 Selenium 无关。
标签: python python-3.x selenium-webdriver python-requests selenium-chromedriver