MCPcopy
hub / github.com/go-rod/rod / MustElement

Method MustElement

must.go:581–585  ·  view source on GitHub ↗

MustElement is similar to [Page.Element].

(selector string)

Source from the content-addressed store, hash-verified

579
580// MustElement is similar to [Page.Element].
581func (p *Page) MustElement(selector string) *Element {
582 el, err := p.Element(selector)
583 p.e(err)
584 return el
585}
586
587// MustElementR is similar to [Page.ElementR].
588func (p *Page) MustElementR(selector, jsRegex string) *Element {

Callers 15

TestWaitDownloadFunction · 0.45
TestWaitDownloadDataURIFunction · 0.45
TestKeyActionsFunction · 0.45
TestKeyTypeFunction · 0.45
TestKeyTypeErrFunction · 0.45
TestInputFunction · 0.45
TestMouseFunction · 0.45
TestMouseClickFunction · 0.45
TestMouseDoubleClickFunction · 0.45
TestNativeDragFunction · 0.45
TestPageHTMLFunction · 0.45

Calls 1

ElementMethod · 0.95

Tested by 15

TestWaitDownloadFunction · 0.36
TestWaitDownloadDataURIFunction · 0.36
TestKeyActionsFunction · 0.36
TestKeyTypeFunction · 0.36
TestKeyTypeErrFunction · 0.36
TestInputFunction · 0.36
TestMouseFunction · 0.36
TestMouseClickFunction · 0.36
TestMouseDoubleClickFunction · 0.36
TestNativeDragFunction · 0.36
TestPageHTMLFunction · 0.36