I ran into the same problem and there's not a lot of documentation available. It is possible, though. The webdriver executable lives inside the application for the preview. Set up a webdriver service to use it. (I have a few extra options included...)
SafariDriverService serv = SafariDriverService.CreateDefaultService("/Applications/Safari Technology Preview.app/Contents/MacOS/", "safaridriver");
SafariOptions opts = new SafariOptions();
opts.AddAdditionalCapability(CapabilityType.AcceptSslCertificates, true);
opts.AddAdditionalCapability(CapabilityType.AcceptInsecureCertificates, true);
opts.AddAdditionalCapability("cleanSession", true);
webDriver = new SafariDriver(serv, opts);
manpreet
Best Answer
2 years ago
How we instruct Selenium to use Safari Technology Preview in C#?
In Java, we can set that using the method
setUseTechnologyPreview
, but unable to find similar method in C# classSafariOptions
.We have tried by using
options.AddAdditionalCapability('useTechnologyPreview', true)
, but it did not work.