HI,
I'm trying to use the WatIn driver for Coypu, but with no success. In my test, I have a combobox for choosing the browser.
Then, when user clicks a button checks if Internet Explorer is selected as the browser and sets the corresponding driver.
Here's my code for the click event on button:
private void button1_Click(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex == 0)
sessionConfiguration = new SessionConfiguration() { Driver = typeof(Coypu.Drivers.Watin.WatiNDriver) };
else
sessionConfiguration = new SessionConfiguration() { Driver = typeof(Coypu.Drivers.Selenium.SeleniumWebDriver) };
switch (comboBox1.SelectedIndex)
{
case 0: sessionConfiguration.Browser = Coypu.Drivers.Browser.InternetExplorer; break;
case 1: sessionConfiguration.Browser = Coypu.Drivers.Browser.Firefox; break;
case 2: sessionConfiguration.Browser = Coypu.Drivers.Browser.Chrome; break;
}
if (Processados == null)
Processados = new List<Dadostabela>();
if (Rejeitados == null)
Rejeitados = new List<Dadostabela>();
Processados.Clear();
Rejeitados.Clear();
ConsultaProtocoloRVSRAS();
ConsultaProtocoloRFRP();
if (browserSession != null)
{
browserSession.Dispose();
browserSession = null;
}
}
But when I click this button, the application breaks with System.TypeLoadException, the message is in portuguese, it tells that the method ExcuteScript of type Coypu.Drivers.WatIn.WatiNDriver does not have an implemntation.
Also, this is the line where app breaks, on main():
Application.Run(new Form1());
So i'm guessing the error ocurrs on loading the Coypu.WatIn assembly. Now, what I have to do to get this to work???
Thanks