09-09-19 12:01 PM
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?
--------------------------------------------------13-05-22 03:20 PM
13-05-22 03:30 PM
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:
------------------------------
----------------------------------
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
----------------------------------
------------------------------
02-07-22 07:33 AM
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
02-07-22 07:41 AM
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