firefoxopen

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package firefoxopen: Firefox automation with webpage output Provides command-line automation to open URLs in Firefox Supports multiple window and tab opening modes with flexible URL handling Enables programmatic web content presentation via Firefox

firefoxopen: 用于网页显示的 Firefox 浏览器自动化 为在 Firefox 浏览器中打开 URL 提供命令行自动化 支持多种窗口和标签打开模式,具有灵活的 URL 处理 为 Web 内容展示启用程序化浏览器控制

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(command *osexec.OsCommand, urls []string, openOption string)

Open executes Firefox command with specified URLs and opening options Constructs command arguments and executes Firefox with provided URLs Supports various Firefox command-line options with flexible webpage control

Open 使用指定的 URL 和打开选项执行 Firefox 命令 构建命令参数并使用提供的 URL 执行 Firefox 支持各种 Firefox 命令行选项以实现灵活的浏览器控制

func OpenInNewTabs

func OpenInNewTabs(command *osexec.OsCommand, urls ...string)

OpenInNewTabs opens multiple URLs in new Firefox tabs Creates tabs within existing; creates new Firefox window Uses Firefox --new-tab option to organize tabs

OpenInNewTabs 在新的 Firefox 标签中打开多个 URL 在现有或新的 Firefox 窗口中创建浏览器标签 使用 Firefox --new-tab 选项实现基于标签的组织

func OpenInNewWindows

func OpenInNewWindows(command *osexec.OsCommand, urls ...string)

OpenInNewWindows opens multiple URLs in separate Firefox windows Creates individual windows via Firefox using each provided URL Uses Firefox --new-window option to separate windows

OpenInNewWindows 在单独的 Firefox 窗口中打开多个 URL 为每个提供的 URL 创建单独的浏览器窗口 使用 Firefox --new-window 选项实现窗口分离

Types

type FirefoxShow

type FirefoxShow struct {
	// contains filtered or unexported fields
}

FirefoxShow manages Firefox browser automation with webpage output control Provides coordinated webpage generation and Firefox opening with timing control Handles temporary HTTP service and browser window management

FirefoxShow 管理 Firefox 浏览器自动化与网页输出控制 提供协调的网页生成和 Firefox 打开及时间控制 处理临时 HTTP 服务和浏览器窗口管理

func NewFirefoxDraw

func NewFirefoxDraw() *FirefoxShow

NewFirefoxDraw creates Firefox automation with default configuration for development Initializes browser automation using default HTTP test service and debug command setup Returns ready-to-use Firefox automation handler with optimal development settings

NewFirefoxDraw 使用开发的默认配置创建 Firefox 自动化 使用默认 HTTP 测试服务和调试命令设置初始化浏览器自动化 返回具有优化开发设置的即用 Firefox 自动化处理器

func NewFirefoxShow

func NewFirefoxShow(service *gintestpage.Service, command *osexec.OsCommand) *FirefoxShow

NewFirefoxShow creates Firefox automation instance with custom service and command Initializes browser automation using provided HTTP service and OS command configuration Returns configured Firefox automation handler for coordinated browser operations

NewFirefoxShow 使用自定义服务和命令创建 Firefox 自动化实例 使用提供的 HTTP 服务和操作系统命令配置初始化浏览器自动化 返回配置的 Firefox 自动化处理器以实现协调的浏览器操作

func (*FirefoxShow) Close

func (op *FirefoxShow) Close(waitTime time.Duration)

Close terminates Firefox automation after specified wait time Waits for remaining time based on when pages were shown and closes HTTP service Uses sync.Once to ensure cleanup happens exactly once

Close 在指定等待时间后终止 Firefox 自动化 根据页面显示时间等待剩余时间并关闭 HTTP 服务 使用 sync.Once 确保清理操作仅执行一次

func (*FirefoxShow) Open added in v0.0.7

func (op *FirefoxShow) Open(pages []string, openOption string)

func (*FirefoxShow) Show

func (op *FirefoxShow) Show(pages []string, openOption string)

func (*FirefoxShow) ShowInNewTabs

func (op *FirefoxShow) ShowInNewTabs(pages ...string)

ShowInNewTabs displays HTML pages in new Firefox tabs Opens each page in a new tab within existing or new Firefox window Creates temporary URLs and launches Firefox with --new-tab option

ShowInNewTabs 在新的 Firefox 标签中显示 HTML 页面 在现有或新的 Firefox 窗口的新标签中打开每个页面 创建临时 URL 并使用 --new-tab 选项启动 Firefox

func (*FirefoxShow) ShowInNewWindows

func (op *FirefoxShow) ShowInNewWindows(pages ...string)

ShowInNewWindows displays HTML pages in separate Firefox windows Opens each page in its own Firefox window for independent viewing Creates temporary URLs and launches Firefox with --new-window option

ShowInNewWindows 在单独的 Firefox 窗口中显示 HTML 页面 在独立的 Firefox 窗口中打开每个页面以供独立查看 创建临时 URL 并使用 --new-window 选项启动 Firefox

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL