Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@
<MicrosoftPlaywrightVersion>1.28.0</MicrosoftPlaywrightVersion>
<PollyExtensionsHttpVersion>3.0.0</PollyExtensionsHttpVersion>
<PollyVersion>7.2.4</PollyVersion>
<SeleniumSupportVersion>4.10.0</SeleniumSupportVersion>
<SeleniumWebDriverChromeDriverVersion>114.0.5735.9000</SeleniumWebDriverChromeDriverVersion>
<SeleniumWebDriverVersion>4.10.0</SeleniumWebDriverVersion>
<SeleniumSupportVersion>4.12.2</SeleniumSupportVersion>
<SeleniumWebDriverChromeDriverVersion>116.0.5845.9600</SeleniumWebDriverChromeDriverVersion>
<SeleniumWebDriverVersion>4.12.2</SeleniumWebDriverVersion>
<SerilogExtensionsLoggingVersion>1.4.0</SerilogExtensionsLoggingVersion>
<SerilogSinksFileVersion>4.0.0</SerilogSinksFileVersion>
<StackExchangeRedisVersion>2.6.122</StackExchangeRedisVersion>
Expand Down
6 changes: 2 additions & 4 deletions src/Components/test/E2ETest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
},
"author": "",
"license": "MIT",
"dependencies": {
"sauce-connect-launcher": "^1.3.1",
"selenium-standalone": "^7.1.0"
},
"devDependencies": {
"sauce-connect-launcher": "^1.3.1",
"selenium-standalone": "^9.1.1",
Copy link
Member

Choose a reason for hiding this comment

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

"@types/node": "^13.1.7",
"ts-node": "^8.6.2",
"typescript": "^3.7.5"
Expand Down
397 changes: 313 additions & 84 deletions src/Components/test/E2ETest/yarn.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/ProjectTemplates/test/Templates.Tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"author": "",
"license": "MIT",
"dependencies": {
"selenium-standalone": "^7.1.0"
"devDependencies": {
"selenium-standalone": "^9.1.1"
}
}
392 changes: 308 additions & 84 deletions src/ProjectTemplates/test/Templates.Tests/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Shared/E2ETesting/E2ETesting.targets
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<PropertyGroup>
<_PackageJsonLinesContent>@(_PackageJsonLines)</_PackageJsonLinesContent>
<_PackageJsonSeleniumPackage>&quot;selenium-standalone&quot;: &quot;^7.1.0&quot;</_PackageJsonSeleniumPackage>
<_PackageJsonSeleniumPackage>&quot;selenium-standalone&quot;: &quot;^9.1.1&quot;</_PackageJsonSeleniumPackage>
</PropertyGroup>

<Error
Expand Down
11 changes: 7 additions & 4 deletions src/Shared/E2ETesting/SeleniumStandaloneServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Member Author

Choose a reason for hiding this comment

The 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>()
Expand All @@ -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";
Expand Down
3 changes: 2 additions & 1 deletion src/Shared/E2ETesting/selenium-config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"version": "4.12.0",
Copy link
Member Author

Choose a reason for hiding this comment

The 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
Expand Down