So I'm using Python and I have a JSON file that has usernames and passwords in the following format
{
"username": {
"0": "user1",
"1": "user2",
},
"password": {
"0": "user1pass",
"1": "user2pass",
}
}
I'm trying to import credentials from the JSON file into Selenium
username = driver.find_element(By.NAME, "username")
password = driver.find_element(By.NAME, "password")
username.send_keys("test")
password.send_keys("test")
so for example it would pull data of User 1 from the JSON file and pass it into the username field, login then do smth,, then log out and pull the second user etc
I want to do a loop that can extract data from JSON and also work with Selenium to use the data and go to next data etc..not just pulling the data.
What should I be looking for exactly?