You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for contributing to the Selenium site and documentation! A PR well described will help maintainers to review and merge it quickly
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.
A couple of flags were added to the service in FF and this enables those tests we already had.
Description
Motivation and Context
Types of changes
Change to the site (I have double-checked the Netlify deployment, and my changes look good)
Code example added (and I also added the example to all translated languages)
Improved translation
Added new translation (and I also added a notice to each document missing translation)
The condition in GetLogLocation() method has incorrect logic. It checks if _logLocation is null/empty AND if the file doesn't exist, but it should use OR logic instead. This could cause the method to not create a new temp file when needed.
The logical condition is incorrect. When _logLocation is null or empty, checking File.Exists(_logLocation) will always return false, making the condition always true. Use OR operator instead of AND to properly handle both null/empty and non-existent file cases.
Why: The suggestion correctly identifies a logical bug in the new code, as using && would prevent creating a new temp file if _logLocation has a value but the file doesn't exist.
The action failed because the .NET build/test step could not compile due to a missing type: - C# compiler error CS0246 at examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs(48,35): The type or namespace name ConsoleLogHandler could not be found. - This indicates a missing using directive, package/reference, or class definition required by SeleniumDocs.csproj. - The retry wrapper attempted the command three times (dotnet test in examples/dotnet/SeleniumDocs) and each attempt failed with the same compile error, causing the job to exit with code 1.
Relevant error logs:
1: ##[group]Runner Image Provisioner2: Hosted Compute Agent
...
144: > Warning: Could not resolve keysym XF86CameraAccessToggle145: > Warning: Could not resolve keysym XF86NextElement146: > Warning: Could not resolve keysym XF86PreviousElement147: > Warning: Could not resolve keysym XF86AutopilotEngageToggle148: > Warning: Could not resolve keysym XF86MarkWaypoint149: > Warning: Could not resolve keysym XF86Sos150: > Warning: Could not resolve keysym XF86NavChart151: > Warning: Could not resolve keysym XF86FishingChart152: > Warning: Could not resolve keysym XF86SingleRangeRadar153: > Warning: Could not resolve keysym XF86DualRangeRadar154: > Warning: Could not resolve keysym XF86RadarOverlay155: > Warning: Could not resolve keysym XF86TraditionalSonar156: > Warning: Could not resolve keysym XF86ClearvuSonar157: > Warning: Could not resolve keysym XF86SidevuSonar158: > Warning: Could not resolve keysym XF86NavInfo159: Errors from xkbcomp are not fatal to the X server160: ##[group]Run actions/setup-dotnet@v4
...
414: Version: 11.0.28+6415: Path: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.28-6/x64416: ##[endgroup]417: Creating settings.xml with server-id: github418: Writing to /home/runner/.m2/settings.xml419: ##[group]Run nick-fields/[email protected]420: with:421: timeout_minutes: 20422: max_attempts: 3423: command: cd examples/dotnet/SeleniumDocs424: dotnet test425:
426: retry_wait_seconds: 10427: polling_interval_seconds: 1428: warning_on_retry: true429: continue_on_error: false430: env:431: DISPLAY: :99432: GITHUB_TOKEN: ***433: GH_TOKEN: ***434: DOTNET_ROOT: /usr/share/dotnet435: JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.28-6/x64436: JAVA_HOME_11_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.28-6/x64437: ##[endgroup]438: ##[group]Attempt 1439: Determining projects to restore...440: All projects are up-to-date for restore.441: ##[error]/home/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs(48,35): error CS0246: The type or namespace name 'ConsoleLogHandler' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]442: ##[warning]Attempt 1 failed. Reason: Child_process exited with error code 1443: ##[endgroup]444: ##[group]Attempt 2445: Determining projects to restore...446: All projects are up-to-date for restore.447: ##[error]/home/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs(48,35): error CS0246: The type or namespace name 'ConsoleLogHandler' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]448: ##[warning]Attempt 2 failed. Reason: Child_process exited with error code 1449: ##[endgroup]450: ##[group]Attempt 3451: Determining projects to restore...452: All projects are up-to-date for restore.453: ##[error]/home/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs(48,35): error CS0246: The type or namespace name 'ConsoleLogHandler' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]454: ##[endgroup]455: ##[error]Final attempt failed. Child_process exited with error code 1456: Post job cleanup.
The action failed because the .NET build for the example tests did not compile due to API changes in Selenium: - Compilation errors CS1061 in examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs: - (line 68, col 21) and (line 97, col 21): FirefoxDriverService has no definition for LogPath, and no accessible extension method LogPath was found. This indicates the property was removed or renamed in the referenced Selenium WebDriver/FirefoxDriver version. - An additional warning indicates ConsoleLogHandler is obsolete in Troubleshooting/LoggingTest.cs(48,35), suggesting newer Selenium APIs are in use. As a result, dotnet test failed on all three retry attempts and exited with code 1.
Relevant error logs:
1: ##[group]Runner Image Provisioner2: Hosted Compute Agent
...
180: Version: 11.0.28+6181: Path: /Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.28-6/arm64/Contents/Home182: ##[endgroup]183: Creating settings.xml with server-id: github184: Writing to /Users/runner/.m2/settings.xml185: ##[group]Run nick-fields/[email protected]186: with:187: timeout_minutes: 20188: max_attempts: 3189: command: cd examples/dotnet/SeleniumDocs190: dotnet test191:
192: retry_wait_seconds: 10193: polling_interval_seconds: 1194: warning_on_retry: true195: continue_on_error: false196: env:
...
211: Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry212: ----------------213: Installed an ASP.NET Core HTTPS development certificate.214: To trust the certificate, run 'dotnet dev-certs https --trust'215: Learn about HTTPS: https://aka.ms/dotnet-https216: ----------------217: Write your first app: https://aka.ms/dotnet-hello-world218: Find out what's new: https://aka.ms/dotnet-whats-new219: Explore documentation: https://aka.ms/dotnet-docs220: Report issues and find source on GitHub: https://github.com/dotnet/core221: Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli222: --------------------------------------------------------------------------------------223: Determining projects to restore...224: Restored /Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj (in 2.05 sec).225: ##[warning]/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs(48,35): warning CS0618: 'ConsoleLogHandler' is obsolete: 'Use TextWriterHandler instead, will be removed in v4.32' [/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]226: ##[error]/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs(68,21): error CS1061: 'FirefoxDriverService' does not contain a definition for 'LogPath' and no accessible extension method 'LogPath' accepting a first argument of type 'FirefoxDriverService' could be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]227: ##[error]/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs(97,21): error CS1061: 'FirefoxDriverService' does not contain a definition for 'LogPath' and no accessible extension method 'LogPath' accepting a first argument of type 'FirefoxDriverService' could be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]228: ##[warning]Attempt 1 failed. Reason: Child_process exited with error code 1229: ##[endgroup]230: ##[group]Attempt 2231: Determining projects to restore...232: All projects are up-to-date for restore.233: ##[warning]/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs(48,35): warning CS0618: 'ConsoleLogHandler' is obsolete: 'Use TextWriterHandler instead, will be removed in v4.32' [/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]234: ##[error]/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs(68,21): error CS1061: 'FirefoxDriverService' does not contain a definition for 'LogPath' and no accessible extension method 'LogPath' accepting a first argument of type 'FirefoxDriverService' could be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]235: ##[error]/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs(97,21): error CS1061: 'FirefoxDriverService' does not contain a definition for 'LogPath' and no accessible extension method 'LogPath' accepting a first argument of type 'FirefoxDriverService' could be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]236: ##[warning]Attempt 2 failed. Reason: Child_process exited with error code 1237: ##[endgroup]238: ##[group]Attempt 3239: Determining projects to restore...240: All projects are up-to-date for restore.241: ##[warning]/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs(48,35): warning CS0618: 'ConsoleLogHandler' is obsolete: 'Use TextWriterHandler instead, will be removed in v4.32' [/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]242: ##[error]/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs(68,21): error CS1061: 'FirefoxDriverService' does not contain a definition for 'LogPath' and no accessible extension method 'LogPath' accepting a first argument of type 'FirefoxDriverService' could be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]243: ##[error]/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs(97,21): error CS1061: 'FirefoxDriverService' does not contain a definition for 'LogPath' and no accessible extension method 'LogPath' accepting a first argument of type 'FirefoxDriverService' could be found (are you missing a using directive or an assembly reference?) [/Users/runner/work/seleniumhq.github.io/seleniumhq.github.io/examples/dotnet/SeleniumDocs/SeleniumDocs.csproj]244: ##[endgroup]245: ##[error]Final attempt failed. Child_process exited with error code 1246: Post job cleanup.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.
A couple of flags were added to the service in FF and this enables those tests we already had.
Description
Motivation and Context
Types of changes
Checklist
PR Type
Tests
Description
Enable two previously ignored Firefox driver tests
Fix log file path configuration for Firefox service
Correct log location validation logic
Diagram Walkthrough
File Walkthrough
FirefoxTest.cs
Enable Firefox driver logging tests
examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs
[Ignore]
attributes fromLogsToFile()
andLogsLevel()
testmethods
service.LogPath
property assignment (was commented out)GetLogLocation()
method