Hi Katalonians,
I would like to know how long it took to get response and validate the response time.
Can you please guide me how?
Thanks in advance.
Hi Katalonians,
I would like to know how long it took to get response and validate the response time.
Can you please guide me how?
Thanks in advance.
Try Apach Commons Lang 3 StopWatch.
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import java.util.concurrent.TimeUnit
import org.apache.commons.lang3.time.StopWatch
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
WebUI.openBrowser('')
// create a started stopwatch
StopWatch stopWatch = StopWatch.createStarted()
WebUI.navigateToUrl('https://katalon-demo-cura.herokuapp.com/')
WebUI.verifyElementPresent(findTestObject('Object Repository/Page_CURA Healthcare Service/a_Make Appointment'), 10)
// stop the stopwatch
stopWatch.stop()
WebUI.closeBrowser()
println("${stopWatch.getTime(TimeUnit.MILLISECONDS) / 1000} seconds")
Thanks @kazurayam that did it.