# How to set test execution speed.

**URL:** <https://forum.katalon.com/t/how-to-set-test-execution-speed/69295>\
**Category:** Web Testing\
**Tags:** web-testing\
**Created:** [September 5, 2022, 7:07pm UTC](https://forum.katalon.com/t/how-to-set-test-execution-speed/69295 "2022-09-05T19:07:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zahid.asim](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zahid.asim/32/20464_2.png) [@zahid.asim](https://forum.katalon.com/u/zahid.asim)\
**Post date:** [September 5, 2022, 7:07pm UTC](https://forum.katalon.com/t/how-to-set-test-execution-speed/69295/1 "2022-09-05T19:07:00Z")

</div>

I just started learning Katalon Studio. I came across a situation where I need to initialize and use own defined chrome WebDriver instead of the one initialized by Katalon to handle browser push notification scenario. The problem is with this initialized driver, the test execution speed is too fast so some of the tests starts failing.

While execurting tests with web driver which initilized by Katalon, the tests run with default action delay setting of 1 second.

Is there a way to slow down the execution while not using the default driver.?

This is what I am doing in the code to initilize web driver.

```auto
WebDriver driver = new ChromeDriver(options)
DriverFactory.changeWebDriver(driver)
driver.get(URLToNavigate)

```

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [September 5, 2022, 10:25pm UTC](https://forum.katalon.com/t/how-to-set-test-execution-speed/69295/2 "2022-09-05T22:25:18Z")

</div>

You can insert “WebUI.delay()”

> **[\[Common\] Delay | Katalon Docs](https://docs.katalon.com/docs/katalon-studio-enterprise/keywords/utilities-keywords/common-delay)**
>
> Description

That’s equivalent to

```auto
            try {
                Thread.sleep(second * 1000)
            } catch (InterruptedException e) {
                // Thread is interrupted, do nothing
            }

```

---

<div class="post-metadata">

**Author:** ![zahid.asim](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zahid.asim/32/20464_2.png) [@zahid.asim](https://forum.katalon.com/u/zahid.asim)\
**Post date:** [September 6, 2022, 5:41am UTC](https://forum.katalon.com/t/how-to-set-test-execution-speed/69295/3 "2022-09-06T05:41:58Z")

</div>

Hi kazurayam,

Isn’t “WebUI.Delay()” for adding dealy before/after a specific action?

I am talking about overall execution speed of tests, something equivalent to “Delay between actions” setting which is avaialble at **Projet → Settings \> Execution**. The mentioned setting do not have impact when I initilized web driver as mentioned in my above post. .

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [September 6, 2022, 9:00am UTC](https://forum.katalon.com/t/how-to-set-test-execution-speed/69295/4 "2022-09-06T09:00:11Z")

</div>

> [@zahid.asim](#):
>
> The problem is with this initialized driver, the test execution speed is too fast so some of the tests starts failing.

You (your test script) MUST make appropriate wait for the HTML of web page to load completely in a browser window before doing any operation on the page. Your test case script shouldn’t click a button, shouldn’t set text into `<input>` element without making sure that the target HTML element is there and ready. Your test scipt must wait for the HTML elements to be there in the browser.

Are you conscious of this practice? I guess, you aren’t.

The WebUI.openBrowser(url) and WebUI.navigateToUrl(url) implicitly & automaticaly wait for the HTML to load in the opened browser. If you decide not to use the WebUI keywords and you prefer creating a `WebDriver` instance yourself, you MUST write your script so that it waits for the HTML to load completely before your test script starts doing anything on the page. If your script does not make appropriate wait, your test will certainly fail. This is a common pitfall of Selenium testing.

If this is the case for you, _something equivalent to “Delay between actions” setting which is avaialble at Projet → Settings \> Execution_ would not help you at all.

How to fix? — well, I don’t know yet because you haven’t informed to us anything about your current problem. See

> [@\[TIP\] How To Help Us Help You!](http://forum.katalon.com/t/tip-how-to-help-us-help-you/12919/):
>
> My test is BROKEN! NOTHING WORKS! HELP ME! Relax. We get it. We really do. There are some pretty smart and clever people on this forum, but you must realize, they are not magicians or wizards or gods. They cannot see your code, they can’t see your errors and they don’t even know what your AUT is meant to do even though it might seem perfectly obvious to you. So please relax and follow the advice below, before you start writing your post. The advice below will tell you the exact information …

Please show us the error log, show us your test case script, show us the HTML source of the target web page, show us the definition of your Test Object that is used in the test case script to select the HTML element of your interest.
