@Deenuji It looks that your suggestion does something opposite to what I need.
It takes variable from power automate and send it to the variable inside webpage.
I want something opposite.
Maybe there is possible to put return statement in function ExecuteScript() in a such way that it will return a value of global variable to the power automate
And next I will just save this value to excel.
Firstly, I was thinking to use "Get details of element on web page" or "Extract data from web page" but I am newbie with javascript and selectors and I don't know how I should to set the: "UI Element"(maybe somehow mark as whole document), "Attribute name", or how I should fullfill "CSS Selector"
With Web Dev Tools writing in console the names of global variables I can get the values. But this is manual solution and I need it to be done automatically by power automate.