Closed vijay214-dev closed 2 years ago
document
and window
are objects which exist only in browsers. You cannot use them in the test itself, because it runs inside nashorn
js engine, which runs inside JVM(not inside a browser), therefore such objects don't exist.
You must execute any document
or window
callings as a browser script, i.e using ExecuteScript action. Such script is executed inside the browser and you have access to all the JS functionalities/objects of the browser
Thank You
Hi ,
i am trying to get the css property of the pseudo Element(::before) but getting document is not defined. Could you please hep me
verify_mandatory: function () { var element = document.getElementById("caller_id"); $log(element) var sty= window.getComputedStyle(element ,':before') $log(sty.color) },