-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More options #131
base: main
Are you sure you want to change the base?
More options #131
Conversation
{ "Script", 33 } | ||
}; | ||
|
||
var expectedCapabilities = new Dictionary<string, object> |
There was a problem hiding this comment.
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?
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Remove the unused local variable 'impl'.
} | ||
); | ||
|
||
private static readonly List<string> _sauceAllowedOptions = new List<string>(new[] |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Remove the unused local variable 'script'.
private const string DEFAULT_PLATFORM = "Windows 10"; | ||
|
||
//TODO not fond of this name | ||
public static List<string> W3CAllowedOptionsList = new List<string>(new[] |
There was a problem hiding this comment.
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[] |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Remove this commented out code.
|
||
|
||
var impl = new KeyValuePair<string, int>("implicit", 4); | ||
var page = new KeyValuePair<string, int>("pageload", 44); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue found: Remove the unused local variable 'page'.
Adding final SauceOptions