Open vudonblog opened 2 years ago
Normally I can use HideCommandPromptWindow to hide it but when you use it, you don't know how to hide it.
Ok, I try.
I added hideCommandPromptWindow parameter, it can be used for Hide selenium command prompt window.
_driver = UndetectedChromeDriver.Create(
options: options,
driverExecutablePath: driverExecutablePath,
// hide selenium command prompt window
hideCommandPromptWindow: true);
I released a alpha package, you can try it.
PM> Install-Package Selenium.UndetectedChromeDriver -Version 1.0.5-alpha2
Thank you very much it worked well.
One more thing I want to ask you I use options.AddExtension (pathfilecrx); to add Excention in .crx format but it doesn't work
Try it.
options.AddArgument("--load-extension=extensionDirectory")
In UndetectedChromeDriver, other functions except AddArgument cannot be used, the code will use the Arguments parameter to start the chrome process.
var args = options.Arguments
.Select(it => it.Trim())
.Aggregate("", (r, it) => r + " " +
(it.Contains(" ") ? $"\"{it}\"" : it));
var info = new ProcessStartInfo(options.BinaryLocation, args);
...
var browser = Process.Start(info);
I tried using undetected chromedrive but when calling chromedrive it shows command cmd how to hide it?. thank you.