I am working on a web application which displays different message for example one is listed below :
Selector when I select “Leave has been marked successfully” is
(Note: * I have changed to make selector generic)
Now issue is, I get several kind of messages here, according to that value inside “title” attribute will change example, another could be
My objective is to get value of this message, if I use Get Text, it returns “OK”, so I tried to use “Get Attribute” which returned correctly required text i.e. “Leave has been marked successfully” for the first case.
So, then I made this selector further more generic as below, so that I can get all type of text available in “Title” attribute :
Now it stopped giving me the actual text inside attribute “Title” and just returned “Ok” as Text.
Please suggest the correct approach for this.