How to increase the execution speed through Selenium and Webdriver

后端 未结 1 772
情深已故
情深已故 2021-01-21 21:56

Test is very slow during execution of the script without knowing the reason.

This is my script :

driver.Navigate().GoToUrl(url);       
driver.Manage().T         


        
1条回答
  •  礼貌的吻别
    2021-01-21 22:38

    A simple step to make your script/program faster would be to:

    • Remove all the instances of ImplicitWait as:
      • You are extensively using WebDriverWait i.e. Explicit Wait

    As per the documentation of Explicit and Implicit Waits:

    WARNING: Do not mix implicit and explicit waits. Doing so can cause unpredictable wait times. For example setting an implicit wait of 10 seconds and an explicit wait of 15 seconds, could cause a timeout to occur after 20 seconds.

    0 讨论(0)
提交回复
热议问题