-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Blazor] Update selenium versions #50511
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
Changes from all commits
e915386
84cc15e
8b286ee
ebcabcb
b9fd0f6
42a2210
e0440b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,7 +85,7 @@ public static async Task<SeleniumStandaloneServer> GetInstanceAsync(ITestOutputH | |
| private static async Task InitializeInstance(ITestOutputHelper output) | ||
| { | ||
| var port = FindAvailablePort(); | ||
| var uri = new UriBuilder("http", SeleniumHost, port, "/wd/hub").Uri; | ||
| var uri = new UriBuilder("http", SeleniumHost, port).Uri; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This URI no longer exists in Selenium 4.12.0 |
||
|
|
||
| var seleniumConfigPath = typeof(SeleniumStandaloneServer).Assembly | ||
| .GetCustomAttributes<AssemblyMetadataAttribute>() | ||
|
|
@@ -100,22 +100,25 @@ private static async Task InitializeInstance(ITestOutputHelper output) | |
| // In AzDO, the path to the system chromedriver is in an env var called CHROMEWEBDRIVER | ||
| // We want to use this because it should match the installed browser version | ||
| // If the env var is not set, then we fall back on using whatever is in the Selenium config file | ||
| var chromeDriverArg = string.Empty; | ||
| var chromeDriverPathEnvVar = Environment.GetEnvironmentVariable("CHROMEWEBDRIVER"); | ||
| if (!string.IsNullOrEmpty(chromeDriverPathEnvVar)) | ||
| { | ||
| chromeDriverArg = $"--javaArgs=-Dwebdriver.chrome.driver={chromeDriverPathEnvVar}/chromedriver"; | ||
| output.WriteLine($"Using chromedriver at path {chromeDriverPathEnvVar}"); | ||
| } | ||
|
|
||
| var psi = new ProcessStartInfo | ||
| { | ||
| FileName = "npm", | ||
| Arguments = $"run selenium-standalone start -- --config \"{seleniumConfigPath}\" {chromeDriverArg} -- -host {SeleniumHost} -port {port}", | ||
| Arguments = $"run selenium-standalone start -- --config \"{seleniumConfigPath}\" -- --host {SeleniumHost} --port {port}", | ||
| RedirectStandardOutput = true, | ||
| RedirectStandardError = true, | ||
| }; | ||
|
|
||
| if (!string.IsNullOrEmpty(chromeDriverPathEnvVar)) | ||
| { | ||
| psi.EnvironmentVariables["PATH"] = $"{psi.EnvironmentVariables["PATH"]}{Path.PathSeparator}{chromeDriverPathEnvVar}"; | ||
| } | ||
|
|
||
| if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) | ||
| { | ||
| psi.FileName = "cmd"; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| { | ||
| "version": "4.12.0", | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uses Selenium 4.12.0, the default version is 4.9.0 |
||
| "drivers": { | ||
| "chrome": { | ||
| "version" : "114.0.5735.90" | ||
| "version" : "116.0.5845.96" | ||
| } | ||
| }, | ||
| "ignoreExtraDrivers": true | ||
|
|
||
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.
Does this mean https://github.com/dotnet/aspnetcore-internal/blob/main/docs/operations/selenium_update.md should be updated?