4

我正在尝试使用 PyAutoGUI 在 Citrix 环境中填写登录表单。但我无法TAB按键切换表单域。像这样的键Enter工作正常。

手动TAB处理该表单,但无法使用 PyAutoGUI。下面是我正在尝试的代码。

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)

但是,userpass加入单个用户名字段。在正常环境TAB下工作正常。

4

0 回答 0