fysh711426 / UndetectedChromeDriver

GNU General Public License v3.0
166 stars 61 forks source link

System.InvalidCastException: 'Unable to cast object of type 'System.Collections.Generic.Dictionary #15

Closed luanmacek closed 1 year ago

luanmacek commented 1 year ago

Hello when I try to use library I get this error whenever code goes on line calling method driver.GoToUrl(). It happens in example project too

image

fysh711426 commented 1 year ago

Can you provide the initialization code with UndetectedChromeDriver.Create?

luanmacek commented 1 year ago

string path = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ChromeDriver/chromedriver.exe"); var options = new ChromeOptions(); options.AddArgument("--mute-audio"); options.AddArgument("--disable-gpu"); options.AddArgument("--disable-dev-shm-usage"); using var driver = UndetectedChromeDriver.Create(options: options,driverExecutablePath: path);

fysh711426 commented 1 year ago

Selenium and Chrome version is? I can't reproduce this error, it's confusing.

luanmacek commented 1 year ago

Chrome version 103.0.5060.114 and Selenium.UndetectedChromeDriver 1.0.6

luanmacek commented 1 year ago

Fixed it by downgrading chrome and chromedriver to version 75.0.3770.80