I'm trying to use the experimental options, but apparently its no longer defined in ChromeOptions, im guessing i'm just missing something?
What is going on here? I have a feeling its something simple that im overlooking.
Im using code from Here
But this is what i get Here
I also cant get that .js to run either, but thats a different problem.
Code
namespace WEBTEST
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
ChromeOptions cOptions = new ChromeOptions();
cOptions.AddArguments("test-type");
cOptions.AddArguments("start-maximized");
cOptions.setExperimentalOption("excludeSwitches", Arrays.asList("enable-automation"));
IWebDriver driver = new ChromeDriver();
IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
string title = (string)js.ExecuteScript("run");
driver.Url = "http://www.Kittens.com";
}
Aucun commentaire:
Enregistrer un commentaire