Documentation
¶
Index ¶
- type DevBrowser
- func (h *DevBrowser) BrowserPositionAndSizeChanged(fieldName string, oldValue, newValue string) error
- func (h *DevBrowser) BrowserStartUrlChanged(fieldName string, oldValue, newValue string) error
- func (b *DevBrowser) ClearConsoleLogs() error
- func (h *DevBrowser) CloseBrowser() error
- func (h *DevBrowser) CreateBrowserContext() error
- func (h *DevBrowser) Execute(progress func(msgs ...any))
- func (b *DevBrowser) GetConsoleLogs() ([]string, error)
- func (h *DevBrowser) Label() string
- func (h *DevBrowser) Name() string
- func (h *DevBrowser) OpenBrowser()
- func (b *DevBrowser) Reload() error
- func (h *DevBrowser) RestartBrowser() error
- func (b *DevBrowser) SetHeadless(headless bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DevBrowser ¶
type DevBrowser struct {
// contains filtered or unexported fields
}
func New ¶
func New(sc serverConfig, ui userInterface, exitChan chan bool, logger func(message ...any)) *DevBrowser
devbrowser.New creates a new DevBrowser instance.
type serverConfig interface {
GetServerPort() string
}
type userInterface interface {
ReturnFocus() error
}
example : New(serverConfig, userInterface, exitChan)
func (*DevBrowser) BrowserPositionAndSizeChanged ¶
func (h *DevBrowser) BrowserPositionAndSizeChanged(fieldName string, oldValue, newValue string) error
func (*DevBrowser) BrowserStartUrlChanged ¶
func (h *DevBrowser) BrowserStartUrlChanged(fieldName string, oldValue, newValue string) error
func (*DevBrowser) ClearConsoleLogs ¶ added in v0.1.1
func (b *DevBrowser) ClearConsoleLogs() error
ClearConsoleLogs clears the captured console logs in the browser.
func (*DevBrowser) CloseBrowser ¶
func (h *DevBrowser) CloseBrowser() error
func (*DevBrowser) CreateBrowserContext ¶
func (h *DevBrowser) CreateBrowserContext() error
func (*DevBrowser) Execute ¶
func (h *DevBrowser) Execute(progress func(msgs ...any))
func (*DevBrowser) GetConsoleLogs ¶ added in v0.1.1
func (b *DevBrowser) GetConsoleLogs() ([]string, error)
GetConsoleLogs captures and returns console logs from the browser. It executes JavaScript to retrieve console messages and returns them as a slice of strings. Returns an error if the browser context is not initialized or if there's an error executing the script.
func (*DevBrowser) Label ¶
func (h *DevBrowser) Label() string
func (*DevBrowser) Name ¶
func (h *DevBrowser) Name() string
func (*DevBrowser) OpenBrowser ¶
func (h *DevBrowser) OpenBrowser()
func (*DevBrowser) Reload ¶
func (b *DevBrowser) Reload() error
func (*DevBrowser) RestartBrowser ¶
func (h *DevBrowser) RestartBrowser() error
func (*DevBrowser) SetHeadless ¶ added in v0.1.1
func (b *DevBrowser) SetHeadless(headless bool)
SetHeadless configura si el navegador debe ejecutarse en modo headless (sin UI). Por defecto es false (muestra la ventana del navegador). Debe llamarse antes de OpenBrowser().
Click to show internal directories.
Click to hide internal directories.