Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multi login from excel list
#1
I would like to access a site with 10 accounts. I would like to avoid creating 10 .py files. How can I solve this problem?
import time
import os
import zipfile
from random import randint
from numpy.random import randint
import xlrd
workbook = xlrd.open_workbook("C:/Users/utente/Desktop/Selenium code/list.xlsx")
worksheet = workbook.sheet_by_name("LIST")

url = str(worksheet.cell(1,9).value) #

driver.get(url)
driver.implicitly_wait(200)

username = str(worksheet.cell(1,6).value)
password = str(worksheet.cell(1,7).value)

time.sleep(3)
driver.find_element_by_id('login-button').click()
access the first site (do not close the page)
open the second Chrome login site (do not close) etc ...

How can I solve this problem?
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020