I am new to python selenium and working on creating POC for the test automation.
I am trying to open my internal application on firefox. I am getting a pop up to enter the credentials and cursor is in the text box. steps need to automate are :
- send user name in the text box where current cursor is
- send hot key "TAB"
- send password
- send hot key "TAB"
- click on current cursor position
Problem is, there is no way i can identify the text box (PFA). I can only think of making it work on the basis of current cursor position. Please suggest if I can go with other strategy.
Code I tried to get the cursor position:
driver.maximize_window()
winsize=driver.get_window_size()
print(winsize)
cur_loc=driver.get_window_position()
print(cur_loc)