I have this program which logs into microsoft admin then creates new user profiles and i have a for loop that does it but it always only runs twice before stopping. Could this be microsoft limmiting sessions or something else?
The add user page is opened and the rest of the code is ran fine for the first two loops but when the loop is ran for the third time, it doesnt open the page. I tried it on different computers and different users and still the same problem.
Sometimes it only runs once, i tried to run the code line by line and i can confirm that the for loop runs fine but when it gets to the driver.get() line it just doesnt open. Is there a server request limit or something like that?
I have hidden most of the code just for convenience of privacy
def minecraft_creation():
global minecraft_student_counter
driver.maximize_window()
driver.get("https://admin.microsoft.com/")
sleep(4)
#i log into the account here (hidden)
for i in range(len(csv)):
driver.get(
"https://admin.microsoft.com/Adminportal/Home#/users/:/adduser"
)
sleep(4)
#all the code for automation here (hidden)
create_list.append(username)
account_notification = account_notification + username + "n"
1