मैं हेडलेस क्रोम को आजमाने की कोशिश करता हूं, लेकिन मैं इस समस्या में भाग रहा हूं, कि मैं ड्राइवर को हेडलेस मोड में शुरू नहीं कर सकता। मैं google documentation का पालन कर रहा था। क्या मैं कुछ भूल रहा हूँ ?हेडलेस मोड में क्रोमड्राइवर कैसे शुरू करें
var chromeOptions = new ChromeOptions
{
BinaryLocation = @"C:\Users\2-as Aukstas\Documents\Visual Studio 2017\Projects\ChromeTest\ChromeTest\bin\Debug\chromedriver.exe",
DebuggerAddress = "localhost:9222"
};
chromeOptions.AddArguments(new List<string>() {"headless", "disable-gpu" });
var browser = new ChromeDriver(chromeOptions);
browser.Navigate().GoToUrl("https://stackoverflow.com/");
Console.WriteLine(browser.FindElement(By.CssSelector("#h-top-questions")).Text);
आपका 'chromedriver.exe' संस्करण क्या है? – haim770
मेरा संस्करण 2.30.0 है। NuGet –
'BinaryLocation' से इसे क्रोम (ब्राउज़र) के' exe' को इंगित करना चाहिए, 'chromedriver.exe' – haim770