Exception handling with Realbrowserlocusts

蓝咒 提交于 2021-01-29 08:28:13

问题


In using realbrowserlocusts class it appears that I'm limited in any exception handling. The only reference that partially works is: self.client.wait.until(EC.visibility_of_element_located ....

In a failed condition where the element is not found the script simply starts over again. With the script I'm working with I need to maintain a solid session state; I need to throw and exception(report an error), log the user out and then let the script start over again. I've been testing out the behavior with the locust.py script that Nick B. created with several approaches to "try, except" and they work running without realbrowserlocusts (selenium only) but with it the execution just stops. Any examples would be greatly appreciated.

In its current format I've been able to run 3x the amount of a browser-based load per/agent/slave than our commercial tool. My goal is to replace it with a locust/selenium approach.

来源:https://stackoverflow.com/questions/65741178/exception-handling-with-realbrowserlocusts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!