Recently I came across an automation problem. I am using element exist activity using aaname to detect a text. Now in some cases with aaname its not able detect element but with visible innertext its able to detect.
Is there any way we can use put both and if value matches with either aaname or visible innertext then element exist returns true value.
Hi
In element exists activity you will get to see a property called WAITFORREADY
choose as Complete so that it waits for the element to be loaded that includes visibility as well
in terms of selector if you want to have both a simple workaround would be like this
Use a TRY CATCH activity and in TRY block keep your element exists activity which has aaname as attribute
if that works fine
if that fails it goes to CATCH block where keep a element exists activity innertext as attribute
kindly note: we have a limited insight, so we ask.
Would it be always reliable be present (that why we asked) then the selector can be configured to use only the innertext attribute and we can ommit aaname
For a defensive approach Palani gave you a pattern
Another one is about get attribute analysis for the element retrieval along with some other techniques