Issue with getting text from browser and maintaining format

Hello,

I am having some trouble with getting text from a browser and maintaining the format.

I have tried many different ways of getting the text, Get Text, Get Full Text, Get Visible Text, Extract Structured Data, among others and only one of them give me the desired output (Get Visible Text). The issue with Get Visible Text is that sometimes the text that needs to be gathered is too long so it doesn’t all appear on screen. Zooming out doesn’t work either , it messes with both the text format and the text itself it zoomed out far enough for some reason.

I have to store the data in a string, because it later has to be sent to an API.

Am I overlooking an activity that can do this for me or am I missing something else? Is this even possible?

/Marcus

Hi @Larsson_Marcus_L

welcome to forum

as u said loading the text takes time, so use the element exist to check whether the text is there or not.

Then use get text activity with usage of special selectors like css, regex or fuzzy selectors (whichever applicable) to get the text

Regards,

Nived N

Happy Automation

No, I didn’t say that loading the text takes time.

I said that the text is sometimes too large to fit on the screen at the same time which makes Get Visible Text an unviable option.

Using Get Text or Get Full Text removes any new lines that are in the text, and ignores other format options, such as bold text.

@Larsson_Marcus_L
activities like get text, datascraping etc. do not support preserving the text formatings.

It depends on your detail requirements. In such sceanrio a retrieval done on a HTML/XML approach can help.

In case of only small portions of formated tokes are to detect we can do it also on:

However it depends on the details of your case. In case you do need further help please share some more information (e.g. url, screenshots, case description) with us. Thanks

1 Like