I have a function that needs two arguments: user and password, both of them are strings. My problem is that I want to get the arguments from an Excel file (user and password) How can I do it? :(
The function looks like this (I'm using Selenium with Chrome):
def login(user,passwd):
createDir()
driver.get('https://www.fasab2b.com/FasaCL/BBRe-commerce/access/login.do')
driver.maximize_window()
txtId = driver.find_element_by_id("logid")
passw = driver.find_element_by_id("password")
txtId.send_keys(user)
passw.send_keys(passwd)
passw.send_keys(Keys.RETURN)
I want to execute the function with something like this:
for user,password in excelFile:
login(user,password)
print("login made with: " + user + password)
Thankful for any help