I don’t understand why the wait function doesn’t wait according to the timeout set in the function(10 seconds). The wait function seems to just wait 1 second and then finish
I’m sure my path in findTestObject(…) is correct. Because I tried waiting in case the object already exists and the wait function found it.
If the object already exists and the wait function only works, then this function has no meaning anymore
Anyone who had the same problem as me and had a solution, let me know
After much testing, I noticed that this problem appears on Hybrid applications.
Specifically, on page Login (with format web_app), you create a wait() function to wait for an object to exist on page Home (with native_app format). When page Home starts to load, the wait() function immediately stops and returns no object found even though there is still some time to wait.
The wait() function must wait for the “timeout” that I have set up. But no, the wait is not done yet, the wait() function to return a result that is not found
With sample code, it’s just Katalon’s “Wait for Element Present” function
I tried with version 8.6.6, this problem still exists
The waitForElementNotPresent function still ends before the timeout expires
I set the timeout to 60 seconds, the wait function ends after 11 seconds(the same time when the application switches to a new page).
→ And of course the returned result is: Element ‘Object Repository/.etc.’ is present
？？？ I think that the keyword is working as specified. Why do you think “the problem still exists” ?
The waitForElementNotPresent keyword will end as soon as the target element disappers. When the application switches to a new page after 11 seconds, the target element disappers. So the keyword will end. The keyword will wait until the timeout expires only when the target element remains present.
I am afraid that you misunderstood what the keyword does. The name “…NotPresent” might have confused you. The “waitForElementNotPresent” should rather be known as “waitForElementToDisappear”.