I have a problem with getting a dataLayer object using a test in selenium ide. I'm trying to use ide to set the command to execute a script with the "return window.dataLayer" parameter and and assign it to a variable. Then I try to display a message with the content of the variable in the console (ide), but I get undefined.
I expect to echo dataLayer object in selenium IDE console.
I try to run same test (exported from selenium ide) in pytest - it is working, and I see the dataLayer.
Although in the development tools in the same browser I can get the object through the console by typing dataLayer or window.dataLayer.