mkorpela / pabot

Parallel executor for Robot Framework test cases.
https://pabot.org
Apache License 2.0
476 stars 152 forks source link

Some keyword in pyautogui library does not works When using pabot to run GUI auto case in parallel #517

Open yyptina opened 1 year ago

yyptina commented 1 year ago

1.Some keyword in pyautogui library does not works , keyword like 'pyautogui.key down', 'pyautogui.typewrite','pyautogui.Get Windows With Title',When using pabot to run auto cases in parallel to do GUI auto test. 1)My auto cases are writed in RF 2)Run auto cases parallel with command "pabot --processes 8 --outputdir C:/TestResult C:/suitefolder" issue: case failed, keyword such as 'pyautogui.key down', 'pyautogui.typewrite','pyautogui.Get Windows With Title' execution fail. But it can works without pabot, such as use command "robot C:/suitefolder/admin.robot" to run auto case, and keyword 'pyautogui.key down' can works well.

image

When using pabot to run auto cases in parallel, Some keyword in pyautogui library is not works , I do not know why,and how to avoid and solve such problems, could you please help me, do you have good suggestions or methods? thanks

yyptina commented 1 year ago

I think the processes were not isolated when use keyword in pyautogui library, resulting in confusion between processes and case execution failure. When using the pyautogui library, for example, when downloading a file, a window to save the file pops up. This window is not isolated from each process before, which causes other cases to read the window opened by the current testcase. The processes are disordered, and the case execution fails. But how to realize the isolation of pop-up windows between various processes?