Daemo
August 21, 2018, 11:32am
1
Hello Forum;
Need help on how to get output from the script.
For example in selenium, I can write something like this ‘document.getElementById (“pageTitle ” ).innerText’ and this will get all text within the ‘Id’.
Can the activity return inner text? How?
Thanks
Rasmus_J
(Rasmus J.)
August 21, 2018, 11:48am
2
Have a look at get attribute. If it has to be through JS I think I can write an example tonight as I might already have it working in one of my robots
loginerror
(Maciej Kuźmicz)
August 21, 2018, 11:57am
3
Hi @Daemo
Have you looked into the activity called “Inject Js Script”?
It gives you the output as String.
Daemo
August 21, 2018, 11:58am
4
Thank for your reply. Using get attribute works but not for the right purpose.
I’m scanning through a long *** page. Searching by id is the best for now:sunglasses:
Daemo
August 21, 2018, 11:59am
5
Hello;
Yes, that’s what I want. I tried all trick but yet to get a meaningful text.
Can you please help?
Rasmus_J
(Rasmus J.)
August 21, 2018, 12:26pm
6
Here is the solution you are looking for test.zip (2.1 KB)
Just edit the selector of the target for the inject code to a webpage and it will return the innerHTML
Rasmus_J
(Rasmus J.)
August 21, 2018, 1:09pm
7
oh and remember to set the elementID variable to the ID you are looking for
If my post answered your question please mark my answer as solution
Just look below my answer for this box
Daemo
August 21, 2018, 1:27pm
8
Hello RJ;
That works like a charm. Man, you are the best. 50 stars for you:star2:.
You are part of the reason I dump ‘other rpa gear’ (no names). I always knew all problems may be solved here.
Posted an hour ago, went for break, came back and problem ceased to exist.
Thanks again man and keep it up.
Kind regards
1 Like