Skip to content

Enabling two FF driver tests #2401

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

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open

Enabling two FF driver tests #2401

wants to merge 2 commits into from

Conversation

diemol
Copy link
Member

@diemol diemol commented Jul 31, 2025

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

  • 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)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

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

flowchart LR
  A["Ignored Tests"] --> B["Remove [Ignore] Attributes"]
  B --> C["Fix LogPath Property"]
  C --> D["Correct Log Validation"]
  D --> E["Working Firefox Tests"]
Loading

File Walkthrough

Relevant files
Tests
FirefoxTest.cs
Enable Firefox driver logging tests                                           

examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs

  • Remove [Ignore] attributes from LogsToFile() and LogsLevel() test
    methods
  • Fix service.LogPath property assignment (was commented out)
  • Correct log location validation logic in GetLogLocation() method
+3/-6     

Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Logic Error

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.

if (string.IsNullOrEmpty(_logLocation) && !File.Exists(_logLocation))
{

Copy link
Contributor

qodo-merge-pro bot commented Jul 31, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix logical operator in condition

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.

examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs [171-174]

-if (string.IsNullOrEmpty(_logLocation) && !File.Exists(_logLocation))
+if (string.IsNullOrEmpty(_logLocation) || !File.Exists(_logLocation))
 {
     _logLocation = Path.GetTempFileName();
 }
  • Apply / Chat
Suggestion importance[1-10]: 8

__

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.

Medium
  • Update

Copy link

netlify bot commented Jul 31, 2025

Deploy Preview for selenium-dev ready!

Name Link
🔨 Latest commit 7eb3a10
🔍 Latest deploy log https://app.netlify.com/projects/selenium-dev/deploys/688b64fd65c7e20008eeca59
😎 Deploy Preview https://deploy-preview-2401--selenium-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: tests (windows, stable)

Failed stage: Run tests [❌]

Failure summary:

The action failed due to compilation errors in the .NET project. The FirefoxDriverService class does
not contain a definition for LogPath property at two locations:
• Line 68 in FirefoxTest.cs
• Line
97 in FirefoxTest.cs

This suggests that the LogPath property has been removed or renamed in the current version of the
Selenium WebDriver library being used. The action was retried 3 times but failed consistently with
the same compilation errors.

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

188:  Version: 11.0.28+6
189:  Path: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.28-6\x64
190:  ##[endgroup]
191:  Creating settings.xml with server-id: github
192:  Writing to C:\Users\runneradmin\.m2\settings.xml
193:  ##[group]Run nick-fields/[email protected]
194:  with:
195:  timeout_minutes: 20
196:  max_attempts: 3
197:  command: cd examples/dotnet/SeleniumDocs
198:  dotnet test
199:  
200:  retry_wait_seconds: 10
201:  polling_interval_seconds: 1
202:  warning_on_retry: true
203:  continue_on_error: false
204:  env:
205:  DISPLAY: :99
206:  GITHUB_TOKEN: ***
207:  GH_TOKEN: ***
208:  DOTNET_ROOT: C:\Program Files\dotnet
209:  JAVA_HOME: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.28-6\x64
210:  JAVA_HOME_11_X64: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.28-6\x64
211:  ##[endgroup]
212:  ##[group]Attempt 1
213:  Determining projects to restore...
214:  Restored D:\a\seleniumhq.github.io\seleniumhq.github.io\examples\dotnet\SeleniumDocs\SeleniumDocs.csproj (in 13.54 sec).
215:  ##[warning]D:\a\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' [D:\a\seleniumhq.github.io\seleniumhq.github.io\examples\dotnet\SeleniumDocs\SeleniumDocs.csproj]
216:  ##[error]D:\a\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?) [D:\a\seleniumhq.github.io\seleniumhq.github.io\examples\dotnet\SeleniumDocs\SeleniumDocs.csproj]
217:  ##[error]D:\a\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?) [D:\a\seleniumhq.github.io\seleniumhq.github.io\examples\dotnet\SeleniumDocs\SeleniumDocs.csproj]
218:  Workload updates are available. Run `dotnet workload list` for more information.
219:  ##[warning]Attempt 1 failed. Reason: Child_process exited with error code 1
220:  ##[endgroup]
221:  ##[group]Attempt 2
222:  Determining projects to restore...
223:  All projects are up-to-date for restore.
224:  ##[warning]D:\a\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' [D:\a\seleniumhq.github.io\seleniumhq.github.io\examples\dotnet\SeleniumDocs\SeleniumDocs.csproj]
225:  ##[error]D:\a\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?) [D:\a\seleniumhq.github.io\seleniumhq.github.io\examples\dotnet\SeleniumDocs\SeleniumDocs.csproj]
226:  ##[error]D:\a\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?) [D:\a\seleniumhq.github.io\seleniumhq.github.io\examples\dotnet\SeleniumDocs\SeleniumDocs.csproj]
227:  Workload updates are available. Run `dotnet workload list` for more information.
228:  ##[warning]Attempt 2 failed. Reason: Child_process exited with error code 1
229:  ##[endgroup]
230:  ##[group]Attempt 3
231:  Determining projects to restore...
232:  All projects are up-to-date for restore.
233:  ##[warning]D:\a\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' [D:\a\seleniumhq.github.io\seleniumhq.github.io\examples\dotnet\SeleniumDocs\SeleniumDocs.csproj]
234:  ##[error]D:\a\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?) [D:\a\seleniumhq.github.io\seleniumhq.github.io\examples\dotnet\SeleniumDocs\SeleniumDocs.csproj]
235:  ##[error]D:\a\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?) [D:\a\seleniumhq.github.io\seleniumhq.github.io\examples\dotnet\SeleniumDocs\SeleniumDocs.csproj]
236:  Workload updates are available. Run `dotnet workload list` for more information.
237:  ##[endgroup]
238:  ##[error]Final attempt failed. Child_process exited with error code 1
239:  Post job cleanup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant