[英]How to smoothly execute mulitple Selenium scripts on a single machine at a given time
I execute automation Selenium Scripts on remote machine which is set to perform 5 jobs at a time (5 scripts can be executed at a time by instantiating 5 browser instances).But everytime atleast 1 or 2 random scripts fail with random errors such as null pointer exception, Element not visible or not able to click the element. 我在设置为一次执行5个作业的远程计算机上执行自动化Selenium脚本(可以通过实例化5个浏览器实例来一次执行5个脚本),但是每次至少有1或2个随机脚本失败并出现诸如空指针之类的随机错误例外,元素不可见或无法单击元素。 But it won't happen if only 3 jobs are run at a time. 但是,一次只运行3个作业就不会发生。 What's the best way i can prevent the scripts from failing. 我可以防止脚本失败的最佳方法是什么。
very vague question. 非常模糊的问题。 Cant really comment on why they are failing without seeing the implementation of classes. 不能真正评论为什么他们失败而没有看到类的实现。
It can happen for a lot of things including latency in network when you are running 5 instances. 当您运行5个实例时,它可能发生在很多方面,包括网络延迟。 If that is the case you might considering using selenium grid and distribute your tests across 2 or more nodes in each of which you can run 3 instances. 如果是这种情况,您可以考虑使用Selenium网格并将测试分布在2个或更多节点上,每个节点可以运行3个实例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.