Skip to content

Feature Request: Add Safari Browser Support #41

@joeblew999

Description

@joeblew999

Is your feature request related to a problem? Please describe.

Currently, the nsgo/browser package at https://github.com/no-src/nsgo/blob/main/browser/browser.go#L30 primarily supports Chrome, Edge, and Firefox. This limits the utility of nsgo for users who primarily use Safari or who need to test web applications specifically on Safari, which has a significant market share, especially among macOS and iOS users.

Describe the solution you'd like

I propose adding support for the Safari browser to the browser.go file. This would involve:
Detecting Safari: Implementing logic to identify if Safari is installed and available on the system (primarily macOS).
Launching Safari: Adding a new case within the GetBrowserPath and GetBrowser functions to return the appropriate executable path and BrowserType for Safari.
Describe alternatives you've considered
Manual Safari Testing: Users currently have to manually open Safari to test, which bypasses the convenience offered by nsgo.
Using other browsers: While other browsers are supported, this doesn't address the need for Safari-specific testing or usage.
Additional context
Adding Safari support would enhance the cross-browser compatibility of nsgo and make it a more comprehensive tool for web development, testing, and automation across different browser environments.

Example of where the change would likely occur:

https://github.com/no-src/nsgo/blob/main/browser/browser.go#L30

A new case for SAFARI would be needed, similar to the existing ones for CHROME, EDGE, and FIREFOX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions