Skip to content

Conversation

@nadvolod
Copy link
Contributor

@nadvolod nadvolod commented Feb 4, 2020

Adding final SauceOptions

@nadvolod nadvolod added the dotnet .NET Bindings label Feb 4, 2020
@nadvolod nadvolod linked an issue Feb 4, 2020 that may be closed by this pull request
{ "Script", 33 }
};

var expectedCapabilities = new Dictionary<string, object>
Copy link
Contributor Author

@nadvolod nadvolod Mar 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshmgrant @titusfortner I'm struggling here, are these the right expectedCapabilities for my test? Because I can see that when I do DriverOptions SeleniumOptions = new FirefoxOptions() I get back.

SeleniumOptions
{{
  "browserName": "firefox",
  "moz:firefoxOptions": {}
}}
    AcceptInsecureCertificates: null
    BrowserExecutableLocation: null
    BrowserName: "firefox"
    BrowserVersion: null
    LogLevel: Default
    PageLoadStrategy: Default
    PlatformName: null
    Profile: null
    Proxy: null
    UnhandledPromptBehavior: Default
    UseLegacyImplementation: false
    UseStrictFileInteractability: false

So then the problem is that I have 2 properties on the SeleniumOptions objects. One called browserName that comes from setting FirefoxOptions and the other one is BrowserName which seems like another property on the DriverOptions class from Selenium.

Ultimately the tests want to do SauceOptions.ToDriverOptions().Should().Be(expectedCapabilities);

Anyone know what's the deal here?

@nadvolod
Copy link
Contributor Author

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 8
           

Clones added
============
- dotnet/SimpleSauce.Test/SimpleSauceAcceptanceTests.cs  1
- dotnet/SimpleSauce.Test/SauceOptionsTests.cs  2
         

Clones removed
==============
+ dotnet/SimpleSauce.Test/BaselineSeleniumAcceptanceTests.cs  -1
         

See the complete overview on Codacy

};


var impl = new KeyValuePair<string, int>("implicit", 4);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
);

private static readonly List<string> _sauceAllowedOptions = new List<string>(new[]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public ChromeOptions ChromeOptions { get; private set; }
readonly string sauceUserName = Environment.GetEnvironmentVariable("SAUCE_USERNAME");
readonly string sauceAccessKey = Environment.GetEnvironmentVariable("SAUCE_ACCESS_KEY");
private Uri _sauceUrl;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


var impl = new KeyValuePair<string, int>("implicit", 4);
var page = new KeyValuePair<string, int>("pageload", 44);
var script = new KeyValuePair<string, int>("script", 33);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private const string DEFAULT_PLATFORM = "Windows 10";

//TODO not fond of this name
public static List<string> W3CAllowedOptionsList = new List<string>(new[]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private const string DEFAULT_PLATFORM = "Windows 10";

//TODO not fond of this name
public static List<string> W3CAllowedOptionsList = new List<string>(new[]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return null;
}

//PropertyInfo pinfo = typeof(SauceOptions).GetProperty(capability);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



var impl = new KeyValuePair<string, int>("implicit", 4);
var page = new KeyValuePair<string, int>("pageload", 44);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base automatically changed from master to main March 15, 2021 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dotnet .NET Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finish implementing all of the Sauce Options

2 participants