Skip to content

[main] Update Selenium versions #40488

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

Merged
merged 2 commits into from
Mar 2, 2022
Merged

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Mar 1, 2022

Start of the month Selenium update

@JamesNK JamesNK requested review from a team, dougbu, wtgodbe and Pilchie as code owners March 1, 2022 23:20
@JamesNK JamesNK added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Mar 1, 2022
@TanayParikh
Copy link
Contributor

Unable to find package Selenium.WebDriver.ChromeDriver with version (>= 98.0.4758.10200)

  • Found 137 version(s) in dotnet-public [ Nearest version: 97.0.4692.7100 ]

We'll need to get the Selenium.WebDriver.ChromeDriver updated in the dotnet feeds (via First responders channel).

@JamesNK
Copy link
Member Author

JamesNK commented Mar 2, 2022

The Selenium update has broken E2E tests. A Selenium or E2E test expert will need to take a look to figure out what is going on.

Partial logs:

> [email protected] selenium-standalone
 > selenium-standalone "start" "--config" "/home/vsts/work/1/s/src/Shared/E2ETesting/selenium-config.json" "--javaArgs=-Dwebdriver.chrome.driver=/usr/local/share/chrome_driver/chromedriver" "--" "-port" "37029"
 
 Unrecognized option: -
 Error: Could not create the Java Virtual Machine.
 Error: A fatal exception has occurred. Program will exit.
 /home/vsts/work/1/s/src/Components/test/E2ETest/node_modules/selenium-standalone/lib/check-started.js:30
       throw new Error(
             ^
 
 Error: Selenium exited before it could start with code 1
 Stdout: 
 Stderr: 
     at checkStarted (/home/vsts/work/1/s/src/Components/test/E2ETest/node_modules/selenium-standalone/lib/check-started.js:30:13)
     at async Object.start (/home/vsts/work/1/s/src/Components/test/E2ETest/node_modules/selenium-standalone/lib/start.js:122:3)
     at async Object.start (/home/vsts/work/1/s/src/Components/test/E2ETest/node_modules/selenium-standalone/bin/selenium-standalone:23:16)
 
 .
    at Microsoft.AspNetCore.E2ETesting.SeleniumStandaloneServer.InitializeInstance(ITestOutputHelper output) in /home/vsts/work/1/s/src/Shared/E2ETesting/SeleniumStandaloneServer.cs:line 230
    at Microsoft.AspNetCore.E2ETesting.SeleniumStandaloneServer.GetInstanceAsync(ITestOutputHelper output) in /home/vsts/work/1/s/src/Shared/E2ETesting/SeleniumStandaloneServer.cs:line 83
    at Microsoft.AspNetCore.E2ETesting.BrowserFixture.CreateBrowserAsync(String context, ITestOutputHelper output) in /home/vsts/work/1/s/src/Shared/E2ETesting/BrowserFixture.cs:line 179
    at Microsoft.AspNetCore.E2ETesting.BrowserTestBase.InitializeBrowser(String isolationContext) in /home/vsts/work/1/s/src/Shared/E2ETesting/BrowserTestBase.cs:line 92
    at Microsoft.AspNetCore.E2ETesting.BrowserTestBase.InitializeAsync(String isolationContext) in /home/vsts/work/1/s/src/Shared/E2ETesting/BrowserTestBase.cs:line 71
    at Xunit.Sdk.TestInvoker`1.<RunAsync>b__47_0() in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 221
    at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) in C:\Dev\xunit\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 114

@TanayParikh
Copy link
Contributor

@JamesNK is it possible to lineup the two chrome driver versions (currently one is 98 the other 99). That may be why we're seeing the failure.

@JamesNK
Copy link
Member Author

JamesNK commented Mar 2, 2022

Your change fixed it.

Can this be merged and backported now?

Copy link
Contributor

@TanayParikh TanayParikh left a comment

Choose a reason for hiding this comment

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

Thanks!

@TanayParikh TanayParikh merged commit fb3d4f9 into main Mar 2, 2022
@TanayParikh TanayParikh deleted the jamesnk/update-selenium-march branch March 2, 2022 22:47
@ghost ghost added this to the 7.0-preview3 milestone Mar 2, 2022
@dougbu
Copy link
Contributor

dougbu commented Mar 2, 2022

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2022

Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1925057832

@dougbu
Copy link
Contributor

dougbu commented Mar 2, 2022

Can this be merged and backported now?

Yes, trying release/6.0 first

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2022

@dougbu backporting to release/6.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: [main] Update Selenium versions
Using index info to reconstruct a base tree...
M	eng/Versions.props
M	src/Components/test/E2ETest/package.json
Falling back to patching base and 3-way merge...
Auto-merging src/Components/test/E2ETest/package.json
CONFLICT (content): Merge conflict in src/Components/test/E2ETest/package.json
Auto-merging eng/Versions.props
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 [main] Update Selenium versions
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@dougbu
Copy link
Contributor

dougbu commented Mar 2, 2022

@TanayParikh or @JamesNK could one of you please cherry-pick fb3d4f9 to 3.1, 5.0 and 6.0 branches❔

@JamesNK
Copy link
Member Author

JamesNK commented Mar 2, 2022

Sure, I'll do it

JamesNK added a commit that referenced this pull request Mar 2, 2022
* [main] Update Selenium versions

* Update src/Components/test/E2ETest/package.json

Co-authored-by: Tanay Parikh <[email protected]>
@JamesNK
Copy link
Member Author

JamesNK commented Mar 3, 2022

@dougbu I'm not sure about backporting to 3.1. That branch uses version 2.43 of Selenium driver package from 2018. Should it be updated?

@dougbu
Copy link
Contributor

dougbu commented Mar 3, 2022

I'm not sure about backporting to 3.1. That branch uses version 2.43 of Selenium driver package from 2018. Should it be updated?

I'm don't really know. I tried to trace our history back to the 2.43 versions. Got as far as 932c553 and saw @TanayParikh had to react to breaking changes back then. Stopped looking because I suspect we needed to make larger changes between 2.43 and 4.0.0-beta2 (the "before" version in 932c553).

Suggest we worry about this if and when something starts breaking when building release/3.1. We've seen problems with older versions in 2.1, 5.0, 6.0, and main but may have something that's future-proof for 3.1.

dougbu pushed a commit that referenced this pull request Mar 4, 2022
* [main] Update Selenium versions

* Update src/Components/test/E2ETest/package.json

Co-authored-by: Tanay Parikh <[email protected]>

Co-authored-by: Tanay Parikh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants