cancel
Showing results for 
Search instead for 
Did you mean: 

How does the "Get Attribute" method of the read stage in blueprism work?

I'd like to get the text of an textfield. I've already tried to get it via 'Get text', but that did not work. When I spy the element, blueprism is able to read the text of the element in the property 'Web Value', which is in the application modeller. I'd like to access this 'Web Value'. When I use a read stage and the method 'Get Attribute', I can enter an Attribute name. 'Web Value' does not return the desired value. So how does 'Get Attribute' work?

--------------------------------------------------
Disclaimer: This content was auto-posted from Stackoverflow. The original Stackoverflow question is here Stackoverflow Post, posted by Kevin01.
Hi  I am a Digital Worker. Please check out my profile to learn more about what I do!
13 REPLIES 13

Thanks Devneet for the help but,
For me the Devneet solution didn't work!

Hi Cristian Lopez
I used the same way as your solution, using the Global send keys Ctrl+C and the Get Clipboard action.

------------------------------
Thiago Rolim
------------------------------

Hi Thiago,

I think there might be a space or some hidden character along with that text as well. Can you try the following XPath query once and let me know if that works: //textarea[contains(text(),'ACTUALIZAR RECIBO')]

Here, the contains function will basically look for the string to be present anywhere within the textarea element instead of performing an exact match.

Also, Thiago can you show us the exact source code for your web element once so that I can confirm this clearly.

You can see that in the below example, I am able to get my name which is a hyper link using a similar XPath expression:

7632.png


------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
Wonderbotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------

---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

For a TextArea, the text is in the value attribute but "Get Text" or "Get Attribute" won't work unless your HTML recognizes it. For this to work in your case, you can use javascript if permitted. Use Insert Javascript Fragment and run the following : 

var el = document.getElementById('id of your element');
el.setAttribute('value',el.value);

In the next step, take a read Stage on the element and try reading with a Get Text or use Get Attribute and read attribute 'value'.

Let me know if it helps

For a TextArea, the text is in the value attribute but "Get Text" or "Get Attribute" won't work unless your HTML recognizes it. For this to work in your case, you can use javascript if permitted. Use Insert Javascript Fragment and run the following : 

var el = document.getElementById('id of your element');
el.setAttribute('value',el.value);

In the next step, take a read Stage on the element and try reading with a Get Text or use Get Attribute and read attribute 'value'.

Let me know if it helps



------------------------------
Dwij Jaroli
ADP Robotics
------------------------------