Custom keyword running slowly

Hello, i would like to share something in the community and hopefully to have an answer back.
I have a project earlier and the execution was very fast. After enhancement, i make use of several Custom Keywords and found that execution took longer period than expected to execute. Any suggestion or solution?

@ziyaad.ellahee

Try to go to disable Self-Healing and Smart Wait, those things aim to enhance stability of your tests, but may add extra time.

does those features still apply in the free version of Katalon?

@ThanhTo, i have disabled them and still executing custom keyword is very slow.

@ziyaad.ellahee

Which version were you previously executing on ? I think you need to identify which specific keyword is taking longer than usual, and provide the implementation of the keywords.

i’m using katalon version 7.7.1 and for example a custom keyword as shown below:

package start_app
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.annotation.Keyword
import com.kms.katalon.core.exception.StepErrorException as StepErrorException
import com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass
import com.kms.katalon.core.main.KeywordClassDelegatingMetaClass
import com.kms.katalon.core.model.FailureHandling
import com.kms.katalon.core.util.KeywordUtil
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable

class start_app {
/**

  • Launch application and verify page load successfully
    */
    @Keyword
    def launchApp(String app) {

    def var_forbidden = findTestObject(‘scr_assertionConsumer/h1_Forbidden’)
    def var_serviceTempUnavailable = findTestObject(‘scr_assertionConsumer/h1_Service Temporarily Unavailable’)

    try {
    WebUI.openBrowser(app)
    if (WebUI.waitForElementVisible(var_forbidden, 1, FailureHandling.OPTIONAL) || WebUI.waitForElementVisible(var_serviceTempUnavailable, 1, FailureHandling.OPTIONAL)) {
    throw new StepErrorException(‘Access Forbidden!’)
    }
    }
    catch (StepErrorException e) {
    WebUI.closeBrowser(FailureHandling.STOP_ON_FAILURE)
    KeywordUtil.markFailedAndStop(‘Service Temporarily Unavailable’)
    }
    }
    }

@ziyaad.ellahee

Try to move that code into a separate test case and execute it, to see which test step in particular is taking longer than you’d think.