Hi guys,
I have a new question for you.
How do I know when an item is no longer visible on the screen?
it’s a web element but I can’t use a selenium or any web driver.
I’m using rpa.windows to inspect the GUI and it works perfectly. but now I have this problem.
Do you know any method to solve this?
Hi Salvatore,
Using rpa.windows you could combine a keyword like Get Element with Run Keyword And Return Status
Set the timeout
short on Get Element
and check the result of Run Keyword And Return Status
to find out if the element was found (True) or not found (False)
From my quick look at rpa.windows I didn’t see a better way.
If you can use other libraries you could also use an image recognition library like SikuliLibrary or ImageHorizon Library.
Hope that helps,
Dave.
I create a Keyboard like this:
Check Exist Loading
${loading}= Set Variable ${TRUE}
WHILE $loading
TRY
Get Element id:divLoadingElem1 depth:99 timeout=1
EXCEPT
${loading}= Set Variable ${FALSE}
END
END
RETURN
@StratoKyke for thought:
The WHILE
keyword holds a default limit of 10000 iterations this can be controlled with arg limit=value, you may find that given the timeout of 1 second you have this “Check Exist Loading” keyword may take a while to resolve.
You can remove the Try/Except
and use as @damies13 suggested, which I believe they where suggesting in chaining the two with Get Element
${isVisible}= Run Keyword And Return Status Get Element ......
You may want to consider handling the WHILE
for when it hits the limit (default or user-passed limit) as it will throw an exception, and FAIL here (this may be the desired outcome, but just for thought) but this can be handled in a couple of ways on either the calling keyword or the inner workings of the keyword.
Thanks