Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当我在主页上执行其他进程时,selenium python能否在后台工作良好?_Python_Selenium_Testing_Automation_Automated Tests - Fatal编程技术网

当我在主页上执行其他进程时,selenium python能否在后台工作良好?

当我在主页上执行其他进程时,selenium python能否在后台工作良好?,python,selenium,testing,automation,automated-tests,Python,Selenium,Testing,Automation,Automated Tests,我正在运行一些测试脚本,当它在后台运行时,我想在excel或其他网页上执行其他工作?但有时候我也会遇到同样的错误,因为selenium找不到要单击的特定字段?原因可能是什么?它在后台运行得不好吗?一般来说,它应该运行得很好,但我发现,当测试与具有相同性能的元素交互时,如果您单击其他位置,它可能会中断。要在我处理其他项目时同时运行selenium,我只需以无头模式运行它,这在大多数情况下都会起作用。 问题是,在执行此操作之前,您必须完成脚本的构建,否则,如果您是新的或对selenium web d

我正在运行一些测试脚本,当它在后台运行时,我想在excel或其他网页上执行其他工作?但有时候我也会遇到同样的错误,因为selenium找不到要单击的特定字段?原因可能是什么?它在后台运行得不好吗?

一般来说,它应该运行得很好,但我发现,当测试与具有相同性能的元素交互时,如果您单击其他位置,它可能会中断。

要在我处理其他项目时同时运行selenium,我只需以无头模式运行它,这在大多数情况下都会起作用。
问题是,在执行此操作之前,您必须完成脚本的构建,否则,如果您是新的或对selenium web driver相当陌生,调试可能会是一场噩梦,如果您可以包含给出错误的代码。并附上错误。非常感谢您的评论,我已经检查了什么是无头模式,它现在工作得更好。还有一个问题,如果我想在web驱动程序运行时关闭它,我应该怎么做,也许我会意识到一个问题,并想立即关闭它。再次感谢,通常我只是在终端上用
ctrl c
进行键盘中断来终止进程。ctrl c可以停止脚本,但它可以关闭在bacground上运行的web驱动程序吗?当脚本停止时,web驱动程序也会终止