Grab a variable out of ExecuteJS
How can i grab a variable from ExecuteJS block
and re-use as variable in loliscript
after navigating to example.com
i tried EXECUTEJS "var store = JSON.stringify(ObjectX)"
The only way to grab it is to generate an element and add it to the DOM (through the ExecuteJS block) and set your data as an attribute of that element, so you can then retrieve it with an ElementAction block.
working with selenium outside of OB, i was able to executejs and return the value and save it to a variable
i already did this many time with python + selenium
so dont you think it is a thing that can be added to ob, since it is already on selenium
Yes sure it can be added, just open an issue on github and maybe provide some piece of code (even in another language) ^_^ I was just answering that you can't do that in the current version of OB, not that it cannot be done at all!
piece of code sent as message box.
and i will write the request in github now
can you add also a way to pass on a variable to EXECUTEJS
for example to pass on the USER or PASS
EXECUTEJS will replace any variable in the script using the usual syntax before actually executing it, so you can type for example
and it will work
yeah, it was my mistake