Repeated operations many times, wait for element not visible will always encounter the same problem and report an error, which can be avoided by directly using delay
I don’t know if there is a problem with my writing? code show as below
WebUI.waitForElementNotVisible(findTestObject(‘Page_IO Controller WAN/Design/Network_Design/Link_Setting/tbtn_LinkSetting_RouteDomain_Add_Confirm’),
30)
I just solved it and need to add a third parameter WebUI.waitForElementNotVisible(findTestObject(‘Page_IO Controller WAN/Design/Network_Design/Link_Setting/tbtn_LinkSetting_RouteDomain_Add_Confirm’), 30, FailureHandling.OPTIONAL)
you are expecting an HTML element to be possibly present in the page at first,
and you are expecting the element to disappear from the page within 30 seconds.
but in fact the HTML element stayed present after 30 seconds,
therefore the WebUI.waitForElementNotVisible() keyword informed you of the fact
I suppose the keyword is working as designed.
You specified FailureHandling.OPTIONAL as the 3rd argument. This means, you instructed the keyword:
Be quiet! Don’t mark this time of test execution as FAILED even if the HTML element is still visible after 30 seconds.
Do you think it is an acceptable solution? I guess, it is not. I suppose, you should check if the target HTML element is really present after 30 seconds or not. If the element is found there, that is the real problem you should look at.
I also understand this principle, but I often encounter elements that are no longer visible, and still report errors. Only when the third keyword is added can it run correctly. This is the biggest problem I am confused about.