更新时间:2023-11-19 12:55:40
我使用了下面的代码并且工作正常.
I used the below code and worked fine.
使用的库:
Library pyautogui
Library ImageHorizonLibrary
代码示例:
Scroll Element Into View xpath=//div[1]/div[5]/a/span
Wait Until Element is visible xpath=//div[1]/div[5]/a/span
Set Focus To Element xpath=//div[1]/div[5]/a/span
Click Element xpath=//div[1]/div[5]/a/span
Sleep 5s
pyautogui.Typewrite file_name.jpg
pyautogui.Key Down 'enter'
ImageHorizonLibrary.Press Combination Key.enter
Sleep 15s
为此,我必须将文件file_name.jpg"保存在默认浏览文件夹中.通过示例代码运行确定了默认文件夹.
For this I had to keep the file "file_name.jpg" in a default browse folder. Identified the default folder through a sample code run.