I am trying to open an Internet Explorer window from Java code as below:
Runtime.getRuntime().exec(folder + ":\\Program Files\\Internet Explorer\\IEXPLORE.EXE http://google.com/");
That works fine but my requirement is to open the window at a small size, for which I followed the link How do you resize an IE browser window to 1024 x 768. But I don't know how I can use the JavaScript solution from Java code.
I tried passing it on the command line:
Runtime.getRuntime().exec(folder + ":\\Program Files\\Internet Explorer\\IEXPLORE.EXE javascript:resizeTo(1024,768); http://google.com/");
But it is not working. Please suggest if you have any idea.
Thanks in advance.