Hi
I met a strange issue, this is part of my code:
WebUI.waitForElementPresent(findTestObject(‘XenMobile - Console - Logon/input_name’), 10)
WebUI.delay(3)
WebUI.setText(findTestObject(‘XenMobile - Console - Logon/input_name’), username)
When I try to run it, waitForElementPresent can find the object while setText cannot, log:
04-09-2018 02:28:52 PM - [START] - Start action : waitForElementPresent
04-09-2018 02:28:52 PM - [INFO] - Finding Test Object with id ‘Object Repository/XenMobile - Console - Logon/input_name’
04-09-2018 02:28:52 PM - [INFO] - Checking object
04-09-2018 02:28:52 PM - [INFO] - Checking timeout
04-09-2018
02:28:52 PM - [INFO] - Finding web element with id: ‘Object
Repository/XenMobile - Console - Logon/input_name’ located by ‘By.xpath:
//input[@type = ‘text’ and @name = ‘name’ and @id = ‘name’]’ in ‘10’ second(s)
04-09-2018
02:28:52 PM - [INFO] - Found 1 web elements with id: ‘Object
Repository/XenMobile - Console - Logon/input_name’ located by ‘By.xpath:
//input[@type = ‘text’ and @name = ‘name’ and @id = ‘name’]’ in ‘10’ second(s)
04-09-2018 02:28:52 PM - [PASSED] - Object ‘Object Repository/XenMobile - Console - Logon/input_name’ is present
04-09-2018 02:28:52 PM - [END] - End action : waitForElementPresent
04-09-2018 02:28:52 PM - [START] - Start action : delay
04-09-2018 02:28:52 PM - [INFO] - Delaying browser in 3 second(s)
04-09-2018 02:28:55 PM - [PASSED] - Delayed 3 second(s)
04-09-2018 02:28:55 PM - [END] - End action : delay
04-09-2018 02:28:55 PM - [START] - Start action : setText
04-09-2018 02:28:55 PM - [INFO] - Finding Test Object with id ‘Object Repository/XenMobile - Console - Logon/input_name’
04-09-2018 02:28:55 PM - [INFO] - Checking object
04-09-2018 02:28:55 PM - [INFO] - Checking text
04-09-2018 02:28:55 PM - [INFO] - Checking timeout
04-09-2018 02:28:55 PM - [WARNING] - Timeout ‘0’ is invalid. Using default page load timeout: ‘0’
04-09-2018
02:28:55 PM - [INFO] - Finding web element with id: ‘Object
Repository/XenMobile - Console - Logon/input_name’ located by ‘By.xpath:
//input[@type = ‘text’ and @name = ‘name’ and @id = ‘name’]’ in ‘0’ second(s)
04-09-2018
02:28:55 PM - [FAILED] - Unable to set text ‘a’ of object ‘Object
Repository/XenMobile - Console - Logon/input_name’ (Root cause:
com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web
element with id: ‘Object Repository/XenMobile - Console -
Logon/input_name’ located by ‘By.xpath: //input[@type = ‘text’ and @name = ‘name’ and @id = ‘name’]’ not found)
04-09-2018 02:28:55 PM - [END] - End action : setText
04-09-2018
02:28:55 PM - [FAILED] - Test Cases/login FAILED because (of) Unable to
set text ‘a’ of object ‘Object Repository/XenMobile - Console -
Logon/input_name’ (Root cause:
com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web
element with id: ‘Object Repository/XenMobile - Console -
Logon/input_name’ located by ‘By.xpath: //input[@type = ‘text’ and @name = ‘name’ and @id = ‘name’]’ not found)
04-09-2018 02:28:55 PM - [START] - Start listener action : sampleAfterTestCase
Can anybody help to see what’s happening here?
PS: “Timeout ‘0’ is invalid.” what’s timeout 0 means here?