Capture text message from a pop - up message

Hi

I am working on a web application which displays different message for example one is listed below :
image

Selector when I select “Leave has been marked successfully” is

image

(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
image

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 :

image

Now it stopped giving me the actual text inside attribute “Title” and just returned “Ok” as Text.

Please suggest the correct approach for this.

Thanks
Ankit

Hi @ankswe
are you able to get attribute based on aaname instead of title

Thanks
ashwin S

Yes I am able to get the based on aaname, if I don’t change the value inside “Title” attribute, when I make it “*” inside “Title” attribute, it again returns just “Ok”

image

Hi,
Get the selector for complete popup window and then use getAttribute.
Try this.

With this it returns blank if I use “aaname”

This is the selector with full Messagebox window:

image

Kindly try with SCREEN SCRAPPING METHOD from design tab in studio
that would get the text we want
use OCR method to fetch the text and that can be selected in the screen scrapping wizard once after scrapping

hope this would help you
Cheers @ankswe

It does not supports screenscraping :slight_smile:

may i know why so
Cheers @ankswe

@ankswe
Can you share a screenshot of UI Explorer after indicating the popup element?

In title attribute can you replace * with Leave * that might help.

Sorry, I was trying web scraping, let me try again

web scrapping is different from screen scrapping
sure, kindly try once and let know for any queries or clarification
Cheers @ankswe

Yes, it is helping