When you type javascript:window.open('http://stackoverflow.com')
in chrome's navigation bar, it opens new tab. I want same, but when running chrome from cmd:
var process = Process.Start("chrome.exe",
"javascript:window.open('http://stackoverflow.com')");
I'm doing this because I want to close that window later from inside it with window.close()
. If I open website directly, error is thrown:
Scripts may close only the windows that were opened by it.