Issue with get text in a filled form webpage

Hello,
I’m having some trouble getting text from a web page. The target page is a form filled with data (not editable) - some fields have restricted values like “country of birth”, as there is a list of allowed values.
The problem is that GET TEXT returns all the possible values behind the field, even if on the web page is visible only one value.
If I inspect the website this is part of the INNERTEXT of the element
"AFGHANISTAN\nALGERIA\nANDORRA\nARABIA SAUDITA\nARGENTINA\nAUSTRALIA\nAUSTRIA\nBELGIO\nBOLIVIA\nBRASILE\nBULGARIA\nCANADA\nCILE\nCINA REPUBBLICA POPOLARE"

and textContent is what I get with the RPA:
textContent: “AFGHANISTANALGERIAANDORRAARABIA SAUDITAARGENTINAAUSTRALIAAUSTRIABELGIOBOLIVIABRASILEBULGARIACANADACILECINA” ecc.

This is what i see online instead
image

I’ve also tried with GET ATTRIBUTE but aaaname is blank and the other attributes are as listed above.

Has anyone had this problem before?
thank you in advance for your help! :slight_smile:

P.S.
I have no experience in programming but I’m pretty stubborn :stuck_out_tongue:

Hi,

For now, can you try to use PreviewExtaction feature of GetText?

image

We can try several scraping methods and options with preview result.

imagecan

Regards,

Hi Yoichi! :slight_smile:
I’ve already tried all the options.
the result is always the list of possible values
image

Have you tried to get the attribute “selectedItem”. If aaname is empty you can use an anchor to target the combo box.

image

@Chiara_Zatta

You can try get visible text activity as well

Also try to inspect the element and check which property is holding the current value…depending on that we can get the attribute value

Cheers

HI,

As another approach, we may be able to get the target using FindChildren activity.
For now, can you check structure elements around the target using UiExplorer - VisualTree?

image

If each option is independent and has something unique attribute/class when selected, it may work.

Regards,

Hello :slight_smile:
this should be the structure

In the meantime I solved it by switching to Chrome. Using the Active Accessibility method when selecting the target (with Edge I didn’t have this option) it actually get the value I see on video.
And this is the tree with active accessibility method in Chrome
The image depicts a hierarchical tree structure with multiple nested folders labeled mainly as 'grouping,' leading to a final folder labeled 'editable text' and 'text PN.' (Captioned by AI)

Was it a compatiblity issue then?
Thank you again for your answers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.