Single Element Exist

uiautomation
studio

#1

Hi All,

I just wanted to know is there anyway that i can make use of one element exist for all the activity eg: type into,get text etc in my workflow.
pass the selector to it and just get a return value dynamically instead of having element exist for each and every activity


#2

First of all , why do u want to use Element Exist activity for each and every activity in your work flow and pass
selectors to it -

Is it probably because you want to check "whether the Element actually exists or Not ".

If you dont use Element Exist and just use normal activities like type into , get text e.t.c ,
there are 2 possibilities ,

1.> It will perform the required action on that element.
2.> It will not perform the required action - probably due to incorrect selector or some thing else.

So In such cases, the best practice is to

1.> Create correct selectors , which will identify elements correctly and run on every execution.
Note :- _ the attributes which keeps changing , replace them with "Star Sign * "._

2.> Use try/catch for exception handling.