hlivetest

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 10 Imported by: 0

README

HLive Browser Testing Suite

Features

  • Test pages in a browser using Playwright
  • Easy

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ack

func Ack() l.Attributer

func AckWatcher

func AckWatcher(t *testing.T, page playwright.Page, selector string) <-chan error

TODO: detect timeout and errors

func Click

func Click(t *testing.T, pwpage playwright.Page, selector string)

func ClickAndWait

func ClickAndWait(t *testing.T, pwpage playwright.Page, selector string)

func Diff

func Diff(t *testing.T, want any, got any)

func DiffFatal

func DiffFatal(t *testing.T, want any, got any)

func FatalOnErr

func FatalOnErr(t *testing.T, err error)

func GetAttribute

func GetAttribute(t *testing.T, pwpage playwright.Page, selector string, attribute string) string

func GetID

func GetID(t *testing.T, pwpage playwright.Page, selector string) string

func NewBrowserPage

func NewBrowserPage() playwright.Page

func TextContent

func TextContent(t *testing.T, pwpage playwright.Page, selector string) string

func Title

func Title(t *testing.T, pwpage playwright.Page) string

Types

type Server

type Server struct {
	PageServer       *l.PageServer
	PageSessionStore *l.PageSessionStore
	HTTPServer       *httptest.Server
}

func NewServer

func NewServer(pageFn func() *l.Page) *Server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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