core

package
v1.2.6-sp6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const GETNAME = `` /* 190-byte string literal not displayed */
View Source
const GETSELECTOR = `` /* 889-byte string literal not displayed */
View Source
const OBSERVER = `` /* 1028-byte string literal not displayed */
View Source
const OBSERVERRESULT = `` /* 222-byte string literal not displayed */

Variables

View Source
var CheckDisplayFunctions = []func(*GeneralElement) bool{
	normalDisplayCheck,
}
View Source
var GeneralElementRules = map[string][]func(*GeneralElement) GeneralElements{
	"button": generalButtonRules,
}
View Source
var GeneralElementRulesFromPage = map[string][]func(*GeneralPage) GeneralElements{
	"button": generalButtonRulesFromPage,
}
View Source
var KeywordRules = map[string][]func(*GeneralElement) bool{
	"password": passwdSlice,
}

Functions

func ContainsGroup

func ContainsGroup(target string, originGroup []string) bool

func GetAttribute

func GetAttribute(element *rod.Element, attributeStr string) string

func GetWholeAttributesStr

func GetWholeAttributesStr(element *rod.Element) string

func SliceDelete

func SliceDelete(origin []interface{}, target interface{}) []interface{}

Types

type GeneralElement

type GeneralElement struct {
	// contains filtered or unexported fields
}

func CreateElement

func CreateElement(element *rod.Element, page *GeneralPage) *GeneralElement

func (*GeneralElement) CalculateRelevance

func (generalElement *GeneralElement) CalculateRelevance(typeStr string) (float32, error)

func (*GeneralElement) CheckDisplay

func (generalElement *GeneralElement) CheckDisplay() bool

func (*GeneralElement) Click

func (generalElement *GeneralElement) Click() error

func (*GeneralElement) Eval

func (generalElement *GeneralElement) Eval(js string) string

func (*GeneralElement) GeneralGetElement

func (generalElement *GeneralElement) GeneralGetElement(elementStr string) (*GeneralElement, error)

func (*GeneralElement) GeneralGetElements

func (generalElement *GeneralElement) GeneralGetElements(elementStr string) (*GeneralElements, error)

func (*GeneralElement) GeneralGetLatestElement

func (generalElement *GeneralElement) GeneralGetLatestElement(elementStr string, maxLevel int) (*GeneralElement, error)

func (*GeneralElement) GeneralGetLatestElements

func (generalElement *GeneralElement) GeneralGetLatestElements(elementStr string, maxLevel int) (*GeneralElements, error)

func (*GeneralElement) GetAttribute

func (generalElement *GeneralElement) GetAttribute(attr string) (string, error)

func (*GeneralElement) GetAttributeOrigin

func (generalElement *GeneralElement) GetAttributeOrigin(attr string) (string, error)

func (*GeneralElement) GetElement

func (generalElement *GeneralElement) GetElement(elementStr string) (*GeneralElement, error)

func (*GeneralElement) GetElements

func (generalElement *GeneralElement) GetElements(elementStr string) (*GeneralElements, error)

func (*GeneralElement) GetLatestElement

func (generalElement *GeneralElement) GetLatestElement(elementStr string, maxLevel int) (*GeneralElement, error)

func (*GeneralElement) GetParent

func (generalElement *GeneralElement) GetParent() (*GeneralElement, error)

func (*GeneralElement) GetProperty

func (generalElement *GeneralElement) GetProperty(propertyStr string) (string, error)

func (*GeneralElement) GetValue

func (generalElement *GeneralElement) GetValue(value string) (string, error)

func (*GeneralElement) GetWholeAttributesStr

func (generalElement *GeneralElement) GetWholeAttributesStr() string

func (*GeneralElement) HTML

func (generalElement *GeneralElement) HTML() string

func (*GeneralElement) HasTypeKeyword

func (generalElement *GeneralElement) HasTypeKeyword(typeStr string) (bool, error)

func (*GeneralElement) Input

func (generalElement *GeneralElement) Input(inputStr string)

func (*GeneralElement) Origin

func (generalElement *GeneralElement) Origin() *rod.Element

func (*GeneralElement) Redirect

func (generalElement *GeneralElement) Redirect() error

func (*GeneralElement) Selector

func (generalElement *GeneralElement) Selector() string

func (*GeneralElement) String

func (generalElement *GeneralElement) String() string

func (*GeneralElement) Url

func (generalElement *GeneralElement) Url() string

type GeneralElements

type GeneralElements []*GeneralElement

func (GeneralElements) Empty

func (generalElements GeneralElements) Empty() bool

func (GeneralElements) ExcludeTypeElement

func (generalElements GeneralElements) ExcludeTypeElement(typeStr ...string) *GeneralElements

func (GeneralElements) FilteredKeywordElement

func (generalElements GeneralElements) FilteredKeywordElement(filter string) *GeneralElement

func (GeneralElements) FilteredKeywordElements

func (generalElements GeneralElements) FilteredKeywordElements(filter string) *GeneralElements

func (GeneralElements) FilteredTypeElement

func (generalElements GeneralElements) FilteredTypeElement(typeStr ...string) *GeneralElements

func (GeneralElements) First

func (generalElements GeneralElements) First() *GeneralElement

func (GeneralElements) Last

func (generalElements GeneralElements) Last() *GeneralElement

func (GeneralElements) Length

func (generalElements GeneralElements) Length() int

func (GeneralElements) Multi

func (generalElements GeneralElements) Multi() bool

func (GeneralElements) Single

func (generalElements GeneralElements) Single() bool

func (*GeneralElements) Slice

func (generalElements *GeneralElements) Slice(generalElement *GeneralElement) *GeneralElements

func (GeneralElements) String

func (generalElements GeneralElements) String() string

type GeneralPage

type GeneralPage struct {
	// contains filtered or unexported fields
}

func CreatePage

func CreatePage(conf config.PageConfig) (*GeneralPage, error)

func (*GeneralPage) Click

func (generalPage *GeneralPage) Click(elementStr string)

func (*GeneralPage) Close

func (generalPage *GeneralPage) Close()

func (*GeneralPage) CurrentURL

func (generalPage *GeneralPage) CurrentURL() string

func (*GeneralPage) FindElement

func (generalPage *GeneralPage) FindElement(keyword string) (*GeneralElement, error)

func (*GeneralPage) FindElements

func (generalPage *GeneralPage) FindElements(keyword string) (*GeneralElements, error)

func (*GeneralPage) GeneralFindElement

func (generalPage *GeneralPage) GeneralFindElement(keyword string) (*GeneralElement, error)

func (*GeneralPage) GeneralFindElements

func (generalPage *GeneralPage) GeneralFindElements(keyword string) (*GeneralElements, error)

func (*GeneralPage) GetLoginButton

func (generalPage *GeneralPage) GetLoginButton() (*GeneralElement, error)

func (*GeneralPage) HTML

func (generalPage *GeneralPage) HTML() string

func (*GeneralPage) Info

func (generalPage *GeneralPage) Info() string

func (*GeneralPage) Input

func (generalPage *GeneralPage) Input(elementStr, inputStr string)

func (*GeneralPage) OriginPage

func (generalPage *GeneralPage) OriginPage() *rod.Page

func (*GeneralPage) Refresh added in v1.2.2

func (generalPage *GeneralPage) Refresh()

func (*GeneralPage) ScreenShotResult

func (generalPage *GeneralPage) ScreenShotResult() (string, error)

func (*GeneralPage) Screenshot

func (generalPage *GeneralPage) Screenshot(filePath string)

func (*GeneralPage) StartListen

func (generalPage *GeneralPage) StartListen() error

func (*GeneralPage) StopListen

func (generalPage *GeneralPage) StopListen() (string, error)

func (*GeneralPage) StopListenWithBytes

func (generalPage *GeneralPage) StopListenWithBytes() ([]byte, error)

func (*GeneralPage) String

func (generalPage *GeneralPage) String() string

func (*GeneralPage) Test

func (generalPage *GeneralPage) Test()

func (*GeneralPage) Url

func (generalPage *GeneralPage) Url() string

func (*GeneralPage) Wait

func (generalPage *GeneralPage) Wait()

type StartMode

type StartMode struct {
	// contains filtered or unexported fields
}

func PageCreator

func PageCreator() *StartMode

func (*StartMode) Cancel

func (startMode *StartMode) Cancel()

func (*StartMode) Create

func (mode *StartMode) Create() (*GeneralPage, error)

func (*StartMode) SetExePath added in v1.2.3

func (mode *StartMode) SetExePath(exePath string)

func (*StartMode) SetLeakless added in v1.2.4

func (mode *StartMode) SetLeakless(leakless config.LeaklessMode)

func (*StartMode) SetProxy

func (mode *StartMode) SetProxy(proxyStr ...string)

func (*StartMode) SetURL

func (mode *StartMode) SetURL(url string)

func (*StartMode) SetWsAddress

func (mode *StartMode) SetWsAddress(wsAddress string)

func (*StartMode) Test

func (mode *StartMode) Test()

Jump to

Keyboard shortcuts

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