Skip to content

[dotnet] Safari driver supports /status endpoint #15066

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

Conversation

nvborisenko
Copy link
Member

@nvborisenko nvborisenko commented Jan 12, 2025

User description

Description

Remove extra code.

Motivation and Context

Safari driver supports /status endpoint where all others use it to understand whether service is initialized.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

Enhancement


Description

  • Removed redundant IsInitialized property from SafariDriverService.

  • Simplified Safari driver service initialization logic.

  • Improved code maintainability by removing unnecessary HTTP polling.


Changes walkthrough 📝

Relevant files
Enhancement
SafariDriverService.cs
Removed redundant `IsInitialized` property and logic         

dotnet/src/webdriver/Safari/SafariDriverService.cs

  • Removed the IsInitialized property and its associated logic.
  • Eliminated unnecessary HTTP polling for service initialization.
  • Simplified the code by relying on Safari driver's /status endpoint.
  • +0/-50   

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

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

    Error Handling

    The removal of initialization check logic may affect error detection and reporting when the Safari driver service fails to start properly. Consider validating that error scenarios are still properly handled.

    protected override bool HasShutdown
    {
        // The Safari driver executable does not have a clean shutdown command,
        // which means we have to kill the process.
        get { return false; }
    }

    Copy link
    Contributor

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @nvborisenko
    Copy link
    Member Author

    I tested it on MacOS 15.1.1 (24B91)

    @nvborisenko
    Copy link
    Member Author

    Merging it because of default /status endpoint is better that /fake endpoint, doesn't matter whether it is really implemented on remote-end.

    @nvborisenko nvborisenko merged commit 61dc85b into SeleniumHQ:trunk Jan 12, 2025
    10 checks passed
    sandeepsuryaprasad pushed a commit to sandeepsuryaprasad/selenium that referenced this pull request Mar 23, 2025
    gryznar pushed a commit to gryznar/selenium that referenced this pull request May 17, 2025
    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