我需要能够在正在编写的程序的线程中运行.robot文件,但是只要有对话框,测试就会自动失败并显示
Dialogs library is not supported with timeouts on Python on this platform.
有人知道一个可能的解决方案,使带有对话框的机器人文件能够在线程中运行吗?没有对话框的机械手文件在线程内运行良好。
import os
import threading
import robot
robot_test_object = []
for root, _, files in os.walk(str("C:/Users/Desktop/test")):
for file in files:
if file.endswith(".robot"):
robot_test_object.append(str(os.path.join(root, file)))
print(robot_test_object)
def Run_Button():
run_thread = threading.Thread(target=Run_Robot_Files)
run_thread.daemon = True
run_thread.start()
def Run_Robot_Files():
for robot_tests in robot_test_object:
robot.run(robot_tests)