Documentation ¶
Index ¶
- type BrowserConfig
- type BrowserConfigOpt
- func WithHeadless(headless bool) BrowserConfigOpt
- func WithNoSandBox(noSandBox bool) BrowserConfigOpt
- func WithProxy(proxyAddress string, proxyUserInfo ...string) BrowserConfigOpt
- func WithRequestModification(modifyUrl string, modifyTarget ModifyTarget, modifyResult interface{}) BrowserConfigOpt
- func WithResponseModification(modifyUrl string, modifyTarget ModifyTarget, modifyResult interface{}) BrowserConfigOpt
- func WithWsAddress(wsAddress string) BrowserConfigOpt
- type ModifyTarget
- type RequestModification
- type ResponseModification
- type VBrowser
- type VPage
- func (page *VPage) Click(selector string) error
- func (page *VPage) Element(selector string) (*rod.Element, error)
- func (page *VPage) HTML() (string, error)
- func (page *VPage) Input(selector, inputStr string) error
- func (page *VPage) Navigate(urlStr string)
- func (page *VPage) ScreenShot() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrowserConfig ¶
type BrowserConfig struct {
// contains filtered or unexported fields
}
type BrowserConfigOpt ¶
type BrowserConfigOpt func(*BrowserConfig)
func WithHeadless ¶
func WithHeadless(headless bool) BrowserConfigOpt
func WithNoSandBox ¶
func WithNoSandBox(noSandBox bool) BrowserConfigOpt
func WithProxy ¶
func WithProxy(proxyAddress string, proxyUserInfo ...string) BrowserConfigOpt
func WithRequestModification ¶
func WithRequestModification(modifyUrl string, modifyTarget ModifyTarget, modifyResult interface{}) BrowserConfigOpt
func WithResponseModification ¶
func WithResponseModification(modifyUrl string, modifyTarget ModifyTarget, modifyResult interface{}) BrowserConfigOpt
func WithWsAddress ¶
func WithWsAddress(wsAddress string) BrowserConfigOpt
type ModifyTarget ¶
type ModifyTarget string
var BodyModifyTarget ModifyTarget = "body"
var BodyReplaceTarget ModifyTarget = "bodyReplace"
var HeadersModifyTarget ModifyTarget = "headers"
var HostModifyTarget ModifyTarget = "host"
type RequestModification ¶
type RequestModification struct {
// contains filtered or unexported fields
}
func (*RequestModification) Modify ¶
func (modification *RequestModification) Modify(request *rod.HijackRequest) error
type ResponseModification ¶
type ResponseModification struct {
// contains filtered or unexported fields
}
func (*ResponseModification) Modify ¶
func (modification *ResponseModification) Modify(response *rod.HijackResponse) error
type VBrowser ¶
type VBrowser struct {
// contains filtered or unexported fields
}
func CreateHeadlessBrowser ¶
func CreateHeadlessBrowser(opts ...BrowserConfigOpt) *VBrowser
func (*VBrowser) BrowserInit ¶
type VPage ¶
type VPage struct {
// contains filtered or unexported fields
}
func (*VPage) ScreenShot ¶
Click to show internal directories.
Click to hide internal directories.