Forum Discussion
In JavaScript it's,
Browsers.Item(btChrome).RunOptions = "-incognito"
or
Browsers.Item(btEdge).RunOptions = "-inprivate"
- RichardPla2 years agoOccasional Contributor
Thanks, but you reply is not sufficient.
- 1. You might want to consider updating you documentation with that info as it is not immediately obvious that specifying Chrome options requires just one hyphen (“-“) instead of “—”, which is a standard (see https://peter.sh/experiments/chromium-command-line-switches/ )that you follow in you documentation on page https://support.smartbear.com/testcomplete/docs/app-testing/web/general/preparing-browsers/chrome.htmld in paragraph “Command-line arguments”.
- 2. You did NOT address the headless mode of browser operation, which happens to be far more important to my organization. This line of code:
Browsers.Item(btChrome).RunOptions = '-incognito';
does not alter the behavior of the browser, which still shows full UI after starting.
I have tried (rightly or wrongly) an alternative approach based on you documentation (https://support.smartbear.com/testcomplete/docs/app-testing/web/supported-browsers/headless.html ). Here, again, is my code:
var url = "https://msdn.microsoft.com/";
var capabilities = {
"browserName": "chrome",
"goog:chromeOptions": {
"args": [
"-headless",
"-incognito"
]
}
};
Browsers.RemoteItem(“localhost”, capabilities).Run(url);
When executed it terminates with this error:
even though the latest version of chromedriver is present in “C:\ProgramData\SmartBear\WebDrivers\chrome” folder (as per your documentation – “<ProgramData>\SmartBear\WebDrivers\<browser> “).
Can you please either tell me what am I doing wrong when specifying “headless” mode as a simple run option, or explain what is wrong with my code related to the Browser.RemoteItem command.
Related Content
- 4 years ago
- 2 years ago
- 5 years ago
Recent Discussions
- 10 hours ago