Running verifyElementNotPresented, getting error later when trying to click the element

Im running * verifyElementPresent against an image I selected, check the results, and if the element exist
I try to click it, for some reason when I click it throw

Line 15: timeout reached when looking for element ‘xpath=//*[@id=“slot-client”]/img’

how is that possible ? (btw I do not see the element on the page) so it look like the verifyElement did not work,

this does not happen every time

why not try “visualsearch”?

Im using sourcesearch with regular exp, there is a flag that is true if the element is visible and false if it is not , but wondered why this is not consistent

Hi @Nir_Melamoud this is by design:

  • If you use verifyElementPresent and the element is not in the page, then the RPA software waits until !timeout_wait if the element might still appear. If not, it logs an error and !statusOK is set to false.

  • If the element is usually not there, then you can use verifyElementNOTPresent. If the element is in the page, then the RPA software waits until !timeout_wait if the element might still disappear. If not, it logs an error and !statusOK is set to false.

Correct expectation :slight_smile: => This flag is the !statusOK variable.

The sourceSearch command is different because it does not operate on the web page DOM. Instead it grabs the page source code and searches it. So there is no waiting involved. That is why it works different. By contrast, verifyElementPresent works like all the other commands that operate on the DOM (document object model) and take a Selenium IDE locator as input, e. g. CLICK, TYPE,…

yep, thats qhy I use it, thanks