Exception: Year, Month, and Day parameters describe an un-representable DateTime

172 views
Skip to first unread message

Yasir Kuşcu

unread,
Jan 29, 2020, 7:19:44 PM1/29/20
to Selenium Users
I want to install the mozilla plugin.
When I define the xpi file it gives this error


Year, Month, and Day parameters describe an un-representable DateTime

Selenium.WebDriver: 3.141.0
Selenium.Support: 3.141.0

please help me solve this problem

the code is here:


            const string extension1 = @"C:\user_agent_switcher_and_manager-0.3.4-an+fx.xpi";

            FirefoxOptions options = new FirefoxOptions();

            FirefoxProfile profile = new FirefoxProfile();
            profile.AcceptUntrustedCertificates = true;
            profile.AddExtension(extension1);

            options.Profile = profile;

            using (IWebDriver driver = new FirefoxDriver(options))
            {
                //var ext = new FirefoxExtension("C:\\user_agent_switcher_and_manager-0.3.4-an+fx.xpi");
                //ext.Install(profile.ProfileDirectory);
                WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30));
                driver.Navigate().GoToUrl("https://www.google.com/ncr");
                Console.ReadKey();
                driver.Quit();
            }


Joe Ward

unread,
Jan 30, 2020, 2:32:49 AM1/30/20
to seleniu...@googlegroups.com
Doesn’t look like a Selenium issue from the intro action you’ve given. What is throwing the error, the browser?

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2ab00220-0072-4f52-9560-2fa349f17c0d%40googlegroups.com.

Jim Evans

unread,
Jan 30, 2020, 9:47:23 AM1/30/20
to Selenium Users
It’s an issue in the .NET bindings with some zip files, which is what Firefox extensions are. The issue is fixed in the 4.0 alpha versions.

Yasir Kuşcu

unread,
Jan 30, 2020, 10:48:08 AM1/30/20
to Selenium Users
browser does not open
Visual studio gives this error during compilation.
I tried another xpi extension, it still didn't

Yasir Kuşcu

unread,
Jan 30, 2020, 10:49:44 AM1/30/20
to Selenium Users
I'm using c#

Yasir Kuşcu

unread,
Jan 30, 2020, 11:03:31 AM1/30/20
to Selenium Users
I upgraded to Selenium Alpha 4.0. Now he started to make such a mistake.


OpenQA.Selenium.WebDriverException: 'Cannot find a file named 'C:\Users\Yasir\source\repos\selenium.net\selenium.net\bin\Debug\webdriver.json' or an embedded resource with the id 'WebDriver.FirefoxPreferences'.'


Reply all
Reply to author
Forward
0 new messages