Inject Js Script to store output in UI Path Variable

Hi,
I want to store all existing text from this div element, and when I tried this on Console it displays the exacting text. but i’m not able to store this text in UI Path Variables using Inject Js Script, Output.

function (){
document.getElementsByClassName(‘ClassName’)
[document.getElementsByClassName(‘ClassName’).length-1].innerText;
}

Have you tried browsing through the topics about this activity for clues on the correct syntax? :slight_smile:

https://forum.uipath.com/search?q=%22Inject%20Js%20Script%22%20status:solved