Documentation
¶
Overview ¶
Package firefox provides tools to script a marionetted Firefox.
Index ¶
- Constants
- func Attribute[T any](e *WebElement, name string) (T, error)
- func Click(f Finder, by By, sel string) error
- func InnerHTML(f Finder, by By, sel string) (string, error)
- func Property[T any](e *WebElement, name string) (T, error)
- func SendKeys(f Finder, by By, sel, keys string) error
- func TextContent(f Finder, by By, sel string) (string, error)
- func WaitNotPresent(f Finder, by By, sel string) error
- func WaitVisible(f Finder, by By, sel string) error
- type By
- type Client
- func (cli *Client) Browser() *marionette.Client
- func (cli *Client) Close() (err error)
- func (cli *Client) ExecuteScript(src Script, opts ...ScriptOption) (*Response, error)
- func (cli *Client) FindElement(by By, v string) (*WebElement, error)
- func (cli *Client) FindElements(by By, v string) ([]*WebElement, error)
- func (cli *Client) Navigate(v string) (*Response, error)
- type Finder
- type Option
- type Response
- type Script
- type ScriptOption
- type WebElement
Constants ¶
View Source
const ( ByID = marionette.ID ByQuery = marionette.CSS_SELECTOR )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type By ¶
type By = marionette.By
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Firefox client.
Client provides tools to script a marionetted Firefox instance.
func (*Client) Browser ¶
func (cli *Client) Browser() *marionette.Client
Browser returns the marionette client connected to the underlying Firefox browser.
func (*Client) ExecuteScript ¶
func (cli *Client) ExecuteScript(src Script, opts ...ScriptOption) (*Response, error)
func (*Client) FindElement ¶
func (cli *Client) FindElement(by By, v string) (*WebElement, error)
FindElement finds an element using the indicated search strategy.
func (*Client) FindElements ¶
func (cli *Client) FindElements(by By, v string) ([]*WebElement, error)
FindElements finds elements using the indicated search strategy.
type Finder ¶
type Finder = marionette.Finder
type Option ¶
Option configures how a Firefox client should be customized.
func WithFirefoxProfile ¶
WithFirefoxProfile provides the path to the Firefox profile to use.
func WithHeadless ¶
WithHeadless instructs a Firefox client whether it should start with a GUI.
type Response ¶
type Response = marionette.Response
type ScriptOption ¶
func WithScriptNewSandbox ¶
func WithScriptNewSandbox(v bool) ScriptOption
func WithScriptTimeout ¶
func WithScriptTimeout(d time.Duration) ScriptOption
type WebElement ¶
type WebElement = marionette.WebElement
Click to show internal directories.
Click to hide internal directories.