Selenium IDE how to get value of JavaScript variables

selenium-ide

#1

Hi, I’d like to know how to access and store variable JavaScript ‘test’ present in the HTML page (see below)

https://monosnap.com/file/Qpe1Qonsec3uQuN6J1dkDSdZK2VZbd

Thanks in advance


#2

Did you try storeEval? It runs Javascript code in the website… so it should see the value.

The “brutal” way is to use sourceExtract to get it from the page source code :wink:


#3

Thank you for answering :slight_smile:
I’m using this version 3.5.8 of Selenium IDE for Chrome, among the commands there are not the ones you suggested to me.
See Screenshot
https://monosnap.com/file/7MrljtK5ncVoz5YWGvTd5kTicyGBUd

Can you give me an example of what to write in the respective fields “Command”, “Target” “Value” (if necessary)?
Thanks in advance


#4

The screenshot is from the classic Selenium IDE. This forum here is for the modern Kantu Selenium IDE, which is a different project.

You can install Kantu from here: https://chrome.google.com/webstore/detail/kantu-browser-automation/gcbalfbdmfieckjlnblleoemohcganoc?hl=en


#5

:hushed:
:open_mouth: ooops
I didn’t realize it…
now I understand …:grin:

Thank you so much! At this point I try immediately with your examples!

You know if Kantu Selenium IDE is capable to Capture Network Traffic and Http Requests?

Thanks for all


#6

No Selenium IDE or similar tool can do this. Have a look at Wireshark.


#7

ok,
thank you so much!