cancel
Showing results for 
Search instead for 
Did you mean: 

Browser console and Data Item

TomasKochan2
Level 2
Hi, how to return a value from browser console into data item? In object, I tried "Insert Javascript Fragment" but tab "Output" is disabled for me.

36365.png
1 BEST ANSWER

Helpful Answers

bruce.liu
Staff
Staff
Hi Tomas,

What I did previously was to inject a Javascript function using the "Insert Javascript Fragment" action and subsequently used "Invoke Javascript Function" action to execute the same function. The JS function should create an element on the web page, preferrably hidden, and then store the value against the element. Once done, spy the hidden element, and then you will be able to use a simple Read stage to get the value from the element.

I have not tried anything simplier than this, but this does not mean it is not possible. Hope this helps.

View answer in original post

2 REPLIES 2

bruce.liu
Staff
Staff
Hi Tomas,

What I did previously was to inject a Javascript function using the "Insert Javascript Fragment" action and subsequently used "Invoke Javascript Function" action to execute the same function. The JS function should create an element on the web page, preferrably hidden, and then store the value against the element. Once done, spy the hidden element, and then you will be able to use a simple Read stage to get the value from the element.

I have not tried anything simplier than this, but this does not mean it is not possible. Hope this helps.

EVIPUTI
MVP
@TomasKochan2 This should help . ​
------------------------------ Vipul Tiwari Senior Process Simplification Developer Amazon ------------------------------