Documentation ¶
Index ¶
- Constants
- type Engine
- func (cdp *Engine) AddErr(err error)
- func (cdp *Engine) Bigger(i int) szenario.CheckFunc
- func (cdp *Engine) Body(checks ...szenario.CheckFunc) chromedp.Action
- func (cdp *Engine) BreakWaitForUserInput()
- func (cdp *Engine) Contains(s string) szenario.CheckFunc
- func (cdp *Engine) Dump() szenario.CheckFunc
- func (cdp *Engine) DumpHTML(name string)
- func (cdp *Engine) Either(name string, option ...szenario.EitherOption) <-chan any
- func (cdp *Engine) ErrorScreenshot(err error)
- func (cdp *Engine) Execute(szenarios ...szenario.Szenario) int
- func (cdp *Engine) GetURL() string
- func (cdp *Engine) IsHeadless() bool
- func (cdp *Engine) IsPresent(sel interface{}, opts ...chromedp.QueryOption) bool
- func (cdp *Engine) Log() *slog.Logger
- func (cdp *Engine) NotContains(s string) szenario.CheckFunc
- func (cdp *Engine) RunUser(username string) error
- func (cdp *Engine) ScreenShot(name string)
- func (cdp *Engine) SetInputField(stepName string, sel interface{}, value string, ...) error
- func (cdp *Engine) SetStatus(key, val string)
- func (cdp *Engine) SetTimeout(d time.Duration)
- func (cdp *Engine) Step(name string, actions ...chromedp.Action)
- func (cdp *Engine) StepTimeout(name string, timeout time.Duration, actions ...chromedp.Action) error
- func (cdp *Engine) Strings(html *string) szenario.CheckFunc
- func (cdp *Engine) TimeOut(d time.Duration) context.CancelFunc
- func (cdp *Engine) WaitForEver()
- type Option
Constants ¶
const (
PasswordChangeSzenarioName = "Passwd Change"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine contains all information to run a chrome szenario
func (*Engine) BreakWaitForUserInput ¶ added in v0.12.0
func (cdp *Engine) BreakWaitForUserInput()
func (*Engine) Either ¶ added in v0.11.0
func (cdp *Engine) Either(name string, option ...szenario.EitherOption) <-chan any
func (*Engine) ErrorScreenshot ¶
ErrorScreenshot is used to create a screenshot in case of an error
func (*Engine) Execute ¶
Execute runs one or more szenarios it returns the number of szenarios with errors or never returns
func (*Engine) IsHeadless ¶ added in v0.11.0
IsHeadless indicates if the browser is headless (i.e. does not show on screen)
func (*Engine) IsPresent ¶
func (cdp *Engine) IsPresent(sel interface{}, opts ...chromedp.QueryOption) bool
IsPresent checks if something is present
func (*Engine) NotContains ¶
NotContains looks for a string in the body and errs if found
func (*Engine) ScreenShot ¶
ScreenShot saves a screenshot to the outFolder
func (*Engine) SetInputField ¶ added in v0.14.0
func (cdp *Engine) SetInputField(stepName string, sel interface{}, value string, opts ...func(*chromedp.Selector)) error
SetInputField sets a HTML input field and validates that it has been set
func (*Engine) SetTimeout ¶
SetTimeout updates the timeout and restarts the timer
func (*Engine) StepTimeout ¶ added in v0.10.8
func (cdp *Engine) StepTimeout(name string, timeout time.Duration, actions ...chromedp.Action) error
StepTimeout executes a Step with an timeout
func (*Engine) TimeOut ¶
func (cdp *Engine) TimeOut(d time.Duration) context.CancelFunc
TimeOut registers a timeout after which the szenario is canceled
func (*Engine) WaitForEver ¶
func (cdp *Engine) WaitForEver()
WaitForEver blocks until the timeout is reached