4

I am trying to fill a login form in Citrix environment using PyAutoGUI. But I am unable to press TAB key to switch form fields. Keys like Enter is working properly.

Manually TAB is working on that form but it is not working using PyAutoGUI. Below is the code I am trying.

time.sleep(10)
im9 = pyautogui.screenshot()
im9 = np.array(im9)

# locate_image locates image on current screen
username_sp = fi.locate_image(im9, 'Screenshot.png')
if username_sp:
    pyautogui.typewrite('Username\t',interval=1)
    time.sleep(2)
    pyautogui.press('tab')
    pyautogui.typewrite(r'pass',interval=0.25)

But, user and pass get clubbed into single Username field. On normal environment TAB is working Ok.

Arunesh Singh
  • 3,489
  • 18
  • 26

1 Answers1

1

Running into the same issue it looks like how pyautogui sends tab just doesn't work with Citrix. I have been able to send tab with keyboard though.

import keyboard
keyboard.press_and_release('tab')