Increase TimeOut / Ignore Waiting for page to Load

Hello,

I’m attempting to automate a process using Katalon. The steps are as follows

Open Browse → Navigate to URL → Check if element has CSS Class → If it does, Click element to open module → Clicks on Link → This then loads the ‘Updating’ application page, which continues to ‘transfer data’.

This is the part the automation is falling over for the following two reasons

  1. It isn’t progressing to the next step from the ‘click’, I can only presume it is waiting for the page to finish loading however
  2. It is timing out

I’ve tried a number of things but Ive been unsuccessful so far and seeking assistance/guidance/a nudge in the right direction.

Is there anyway I can increase the timeout? I’ve tried to change it via the Project->Settings->Execution but it is still timing out regardless of what i set this too.

Is there anyway I can get katalon to ignore waiting for the page to load before moving to the next step?

EDIT: Thank you for getting back to me, the function for clicking the appropriate update option is:

def runUpdate(UpdateOption) {

	try {

		KeywordUtil.logInfo("Opening Update module...")
		WebUI.click(findTestObject('Login_Page/LoginForm/btn_Bell'))
		WebUI.delay(5)
		KeywordUtil.logInfo("Starting Option ${UpdateOption}")

		switch(UpdateOption) {
			case 'b':
				WebUI.click(findTestObject('Login_Page/Update/b_Standard'))
				break
			case 'c':
				WebUI.click(findTestObject('Login_Page/Update/c_Mini'))
				break
			case 'd':
				WebUI.click(findTestObject('Login_Page/Update/d_Client'))
				break
			default:
				WebUI.click(findTestObject('Login_Page/Update/a_Full'))
				break
		}
		Boolean forceUpdate = WebUI.verifyElementNotPresent(findTestObject('Login_Page/Update/btn_Force_Update'), 5, FailureHandling.OPTIONAL)
		KeywordUtil.logInfo(forceUpdate)
		
		if(forceUpdate == false){
			KeywordUtil.logInfo("Made it in to here for some reason...")
			WebUI.click(findTestObject('Login_Page/FWUpdate/btn_Force_Update'))
			return true
		}
		KeywordUtil.logInfo("Made it out where instead!")
		return true
		
	} catch (WebElementNotFoundException e) {
		KeywordUtil.markErrorAndStop("Error - Unable to locate element, cannot continue")
	} catch (Exception e) {
		KeywordUtil.markErrorAndStop("Error - Unable to run FWUpdate option ${UpdateOption}")
	}
}

The error being encountered is
[1554207407.876][SEVERE]: Timed out receiving message from renderer: 300.000
[1554207407.879][SEVERE]: Timed out receiving message from renderer: -0.005

Because of the above, it then stating its failing to click on the button when in fact it has successfully clicked on this button.

Hi - what number of things have you tried?
Could you please share you whole script and the complete error log. Once i see this it will be much easier for me to give you a solution

1 Like

I agree, seeing your code would be needed. For example which click is it hanging up on? Is your IF statement set up as optional? If you have error handling you can in fact change the wait time to allow it to load. Or use delays.

Please share some code you tried, may be I can help you with.

@hpulsford @B_L @Kumar.Sushobhan

Thank you for getting back to me, Ive added the code and error to the initial post. Let me know if you require any additional information

@Thomas.Rensahw - If I understood your question correctly, the click operation is not working as the page is still loading. Here you can wait for element to be visible or clickable. I have a sample keyword developed for my project which waits for page to load i.e. element to be visible

public class located {

@Keyword
def locatedByXpath(String location) {


	WebDriver driver = DriverFactory.getWebDriver()
	WebDriverWait wait = new WebDriverWait(driver, 60)
	wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(location)))
}


@Keyword
def locatedByID(String location) {


	WebDriver driver = DriverFactory.getWebDriver()
	WebDriverWait wait = new WebDriverWait(driver, 30)
	wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(location)))
}


@Keyword
def locatedByName(String location) {


	WebDriver driver = DriverFactory.getWebDriver()
	WebDriverWait wait = new WebDriverWait(driver, 30)
	wait.until(ExpectedConditions.visibilityOfElementLocated(By.name(location)))
}

}

Later, you can call this keyword in your test script. Here I have used visible, there are many options available once click . after ExpectedConditions

3 Likes

Hello @Kumar.Sushobhan
Thank you for getting back to me. I’ve attempted to add these as a Keyword however, I believe I’m missing some Imports at the top as it is stating ‘WebDriverWait’ as an error.

Edit: I believe I’ve located them after a quick google

import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

@Thomas.Rensahw

Just a quick tip - if you are ever missing imports just click CNTRL+SHIFT+O and katalon will import the missing ones for you automatically :slight_smile:

2 Likes

@hpulsford- CNTRL+SHIFT+O doesn’t work for me everytime. Is it works for you ?

Doesnt work for you in what respect? CNTRL+SHIFT+O should always add the missing classes to your script.

What issue are you facing?

1 Like

It works most of time, but sometimes CNTRL+SHIFT+O doesn’t.
Example:
CNTRL+SHIFT+O worked for JavascriptExecutor, WebElement but it didn’t for By class.
I had to manually write the import statement later for By class
image

I just tried that on my end and it imports the class automatically as expected? anything in particualr you are doing?

@hpulsford - I just downloaded the latest version and now I am able to import with CNTRL+SHIFT+O.
Thank you for your help! :slight_smile:

1 Like

Glad it now works :slight_smile: