I can see these many properties in console if I type window
in Chrome console and hit enter.
But when I am trying to access same properties via Javascript Executor
it gives me null.
I tried:
String homepage = jse().executeScript("window.origin", "found homepage").toString();
System.out.println("home page is "+homepage);
and
String location = "function show_homepage() {var homepage = window.location.origin;return homepage;}"
String homepage = jse().executeScript(location, "found if email validated or not").toString();
System.out.println("Answer is "+homepage);
Reference: