Can we set the speed of the webdriver?

后端 未结 2 1308
遥遥无期
遥遥无期 2020-12-21 20:41

Can we set the speed of the webdriver like we use ISelenium.SetSpeed(String). Can we use IWebdriver.SetSpeed(String)?

I am writing code in

2条回答
  •  礼貌的吻别
    2020-12-21 21:24

    I hate to say it, cause I know it's bad practice.

    But I built a test fixture to log and select cases at whim. These cases are ran through a background worker. While I have explicit waits for every one of the Selenium Commands I use, I needed to slow it down even more as sometimes the explicit wait wasn't enough as it would find the element and continue on before something else needed to happen. This was an issue with overlays and toast messages mainly.

    Soooo, I implemented a "Speed Trackbar" into the GUI of the test fixture and set the intervals from 0 to 2.5 seconds, which controls, yes, here it goes, a Thread.Sleep. This allows me to control the speed of which all commands get executed. Even though the explicit wait is still there.

提交回复
热议问题