Greetings to the whole community!
I would like to consult you about a special case: I want to collect the text of a cell embedded in a web and I am not getting it. The funny thing is that the Get visible text does capture the visible text, but using the same selector, the Get text or Get full text activities don’t capture anything. Inspecting the element on the web, I see attributes that the UI explorer doesn’t show me, it’s like it can’t reach that embedded element, it stays on the outside. I have also tried data scraping and the same thing happens. Any ideas? Thanks in advance
Can you provide a link to where this element exists on the webpage? And do you need to save it as a variable to use later or do you simply want to copy the text and perhaps paste it elsewhere?
I need to store the text, but it would also help to copy it. I cannot paste the link here because it is a private corporate website. But I can explain the attributes of the element in question:
I see is a document nested in html tag. The text is inside that document, under the html tags, head, body, div and various
. The uipath selector stays in the part of the document, but outside, where the rows and columns are, but not inside the cell that contains the text. I hope I have explained myself well. I can’t take a screenshot…
Alright if the element that you want cannot be selected due to being protected, first try changing the UI framework to AA instead of default by hitting the F4 key. If the element can then be selected, then use a ‘Get Text’ activity and save it in a string variable of your choice, and then underneath it, use a ‘Set to Clipboard’ activity with the variable you just created in order to set the text for copying, and then use the ‘Keyboard Shortcut’ to Ctrl V to paste the output value anywhere you want. Alternatively, you can use the ‘Type Into’ activity instead of ‘Set to Clipboard’ which will also work. Try it out and let me know if it works out for you.
What I see is when inspecting the cell that contains the text, there is embedded JS. Since I couldn’t get to the element with anything, I finally put a keyboard shortcut (ctrl+a) to select the text and then a Copy selected text. This has worked quite well for me. With the help of regex and split I clean the text if it captures HTML tags or other symbols to discard.
Thank you very much for the answers
Glad you have managed to do what you want.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.