selector

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package selector provides a set of functions for css selector based assertions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsTextValue

func ContainsTextValue(selection string, expectedTextValue string) func(*http.Response, *http.Request) error

ContainsTextValue returns a function that asserts the first element matching the selection contains the expected text value

func DataTestID

func DataTestID(value string) string

DataTestID returns a css selector for a data-test-id attribute

func Exists

func Exists(selections ...string) func(*http.Response, *http.Request) error

Exists returns a function that asserts the selection exists

func FirstTextValue

func FirstTextValue(selection string, expectedTextValue string) func(*http.Response, *http.Request) error

FirstTextValue returns a function that asserts the first element matching the selection has the expected text value

func NotExists

func NotExists(selections ...string) func(*http.Response, *http.Request) error

NotExists returns a function that asserts the selection does not exist

func NthTextValue

func NthTextValue(n int, selection string, expectedTextValue string) func(*http.Response, *http.Request) error

NthTextValue returns a function that asserts the nth element matching the selection has the expected text value

func Selection

func Selection(selection string, selectionFunc func(*goquery.Selection) error) func(*http.Response, *http.Request) error

Selection returns

func TextExists

func TextExists(text string) func(*http.Response, *http.Request) error

TextExists returns a function that asserts the document contains the expected text

Types

This section is empty.

Jump to

Keyboard shortcuts

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