Итак, проблема в том, что при запуске кода ниже открывается новое окно браузера, но тут же выдаёт ошибку:
OpenQA.Selenium.WebDriverException: "unknown error: MSEdge failed to start: exited normally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from msedge location C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe is no longer running, so MSEdgeDriver is assuming that MSEdge has crashed.)"
using System;
using OpenQA.Selenium.Edge;
namespace OC_University_Learning
{
class Program
{
static void Main(string[] args)
{
EdgeOptions edgeOptions = new EdgeOptions();
edgeOptions.UseChromium = true;
edgeOptions.UseWebView = true;
edgeOptions.BinaryLocation = @"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe";
EdgeDriver edgeDriver = new EdgeDriver(@"D:\Studying\Projects of language\OC_University_Learning\bin\Debug\netcoreapp3.1", edgeOptions);
}
}
}
При этом командная строка выдаёт:
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping MSEdgeDriver safe. MSEdgeDriver was started successfully.