aquality-selenium-dotnet
aquality-selenium-dotnet copied to clipboard
[dotnet core] Exception on File Upload to RemoteWebDriver / FireFox profile: System.NotSupportedException : No data is available for encoding 437
Getting Exception on File Upload to RemoteWebDriver
System.TypeInitializationException : The type initializer for 'System.IO.Compression.ZipStorer' threw an exception. ----> System.NotSupportedException : No data is available for encoding 437 There is a related selenium issue: https://github.com/SeleniumHQ/selenium/issues/4816 https://github.com/SeleniumHQ/selenium/issues/4816#issuecomment-476608576
A workaround should be included into Aquality.Selenium:
reference the System.Text.Encoding System.Text.Encoding.CodePages Nuget package and somewhere before Encoding.GetEncoding(437) gets called, make sure to call Encoding.RegisterProvider(CodePagesEncodingProvider.Instance).
Also we should use LocalFileDetector (as already used in java) for RemoteBrowserFactory