MCPcopy Create free account

hub / github.com/chromedp/chromedp / functions

Functions1,064 in github.com/chromedp/chromedp

↓ 3 callersFunctionremoveNode
(n []*Node, id cdp.NodeID)
util.go:305
↓ 3 callersFunctionresponseAction
responseAction makes an action that runs the steps, waits until the page loads, and returns the response of the HTML document.
chromedp.go:877
↓ 3 callersMethodsetCmdEnv
setCmdEnv sets the environment of the command of the browser. The lowest priority is the environment of the Go process, unless NoInheritEnv is set. Th
allocate.go:754
↓ 3 callersFunctionstartChrome
startChrome starts a browser with a debugging port and returns its websocket address. The cleanup of the test stops the browser.
remote/websocket_test.go:310
↓ 3 callersMethodstop
stop ends the subscription at once, and drops the queued events. It is safe to call more than once.
session.go:167
↓ 3 callersFunctionunexpectedEOF
unexpectedEOF turns io.EOF into io.ErrUnexpectedEOF. A stream must not end in the middle of a frame.
remote/internal/websocket/frame.go:179
↓ 3 callersMethodwithExitError
withExitError returns err with the exit error of the browser process, when the process died while nobody had asked the browser to stop. Otherwise it r
browser.go:522
↓ 3 callersFunctionx
(e,r)
testdata/twgl-full.min.js:6
↓ 3 callersFunctionxe
(e,r,t)
testdata/twgl-full.min.js:6
↓ 3 callersFunctionye
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionAfter
After is an element query option that sets a func to run when the browser has returned the matched nodes and the node condition is true.
query.go:756
↓ 2 callersMethodAllocate
Allocate creates a new browser. Canceling the provided context frees all resources of the browser, such as temporary directories.
allocate.go:27
↓ 2 callersFunctionAttributes
Attributes is an element query action that retrieves the element attributes for the first element node matching the selector.
query.go:1028
↓ 2 callersFunctionBrowserEvents
BrowserEvents is like [Events] for the events of the browser, such as the events of the target domain. It replaces ListenBrowser. Use [ListenBrowser]
action.go:154
↓ 2 callersFunctionButtonType
ButtonType is a mouse action option to set the button to click.
input.go:164
↓ 2 callersFunctionByFunc
ByFunc is an element query action option that sets the func that selects elements. It replaces the lookup that the type of the selector chooses. The s
query.go:396
↓ 2 callersFunctionCaptureScreenshot
CaptureScreenshot is an action that takes a screenshot of the current browser viewport. It acts like the command "Capture screenshot" in Chrome. See
screenshot.go:106
↓ 2 callersFunctionDebug
Debug reports whether the tests must log every protocol message. The variable CHROMEDP_DEBUG turns it on.
internal/testenv/testenv.go:80
↓ 2 callersMethodDump
Dump builds a printable string representation of the node and its children.
node.go:284
↓ 2 callersFunctionEmulateOrientation
EmulateOrientation is an emulate viewport option to set the device viewport screen orientation.
emulate.go:48
↓ 2 callersFunctionEncode
Encode returns an unmasked frame. It writes the shortest length encoding.
remote/internal/wstest/wstest.go:140
↓ 2 callersFunctionEnv
Env sets environment variables, in the form NAME=value, for the new Chrome process. They add to the environment of the Go process, which os.Environ re
allocate.go:730
↓ 2 callersFunctionExecPath
ExecPath returns the browser binary that the tests use. The variable CHROMEDP_TEST_RUNNER names it. Without the variable, ExecPath looks for a browser
internal/testenv/testenv.go:17
↓ 2 callersFunctionF
(e,r,t)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionFullScreenshot
FullScreenshot takes a full screenshot of the entire browser viewport, with the given image quality. It acts like the command "Capture full size scre
screenshot.go:124
↓ 2 callersMethodFullXPath
FullXPath returns the full XPath for the node. It stops only at the top most document root.
node.go:172
↓ 2 callersFunctionK
(e,r,t,n,o)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionKeyEventNode
KeyEventNode is a key action that dispatches a key event on an element node.
input.go:245
↓ 2 callersFunctionListenBrowser
ListenBrowser is like [Listen] for the events of the browser, such as the events of the target domain. The same rules hold for fn. As [BrowserEvents]
action.go:205
↓ 2 callersFunctionMain
Main runs the tests of a test binary. Call it from TestMain. It reads the environment variables of the tests, makes the exec allocator, runs the tests
internal/chromedptest/chromedptest.go:68
↓ 2 callersFunctionMouseClickXY
MouseClickXY is an action that sends a left mouse button click (that is, a mousePressed and a mouseReleased event) to the X, Y location.
input.go:49
↓ 2 callersFunctionNavigateBack
NavigateBack is an action that navigates the current frame backwards in its history, and waits for the page to load.
nav.go:57
↓ 2 callersFunctionNavigateResponse
NavigateResponse is like [Navigate], and returns the HTTP response of the HTML document.
nav.go:23
↓ 2 callersFunctionNavigationEntries
NavigationEntries is an action that retrieves the page's navigation history entries. The result holds the index of the current entry and the entries.
nav.go:43
↓ 2 callersFunctionNoSandbox
NoSandbox reports whether the tests must start the browser without its sandbox. It is true unless CHROMEDP_NO_SANDBOX is "false".
internal/testenv/testenv.go:74
↓ 2 callersFunctionOuterHTML
OuterHTML is an element query action that retrieves the outer html of the first element node matching the selector.
query.go:1188
↓ 2 callersFunctionPDFHeaderTemplate
PDFHeaderTemplate is an option of [PrintToPDF] that sets the HTML of the header, and turns on the header and the footer. The template can use these cl
pdf.go:169
↓ 2 callersFunctionPDFOutlineAndTagged
PDFOutlineAndTagged is an option of [PrintToPDF] that adds the outline of the document, which is a table of contents that a PDF viewer shows for the h
pdf.go:189
↓ 2 callersFunctionPDFPreferCSSPageSize
PDFPreferCSSPageSize is an option of [PrintToPDF] that uses the page size of the CSS rule @page, when the page has one. Otherwise the browser scales t
pdf.go:150
↓ 2 callersFunctionPDFPrintBackground
PDFPrintBackground is an option of [PrintToPDF] that prints the background colors and images. By default, the browser leaves them out.
pdf.go:156
↓ 2 callersFunctionPoll
Poll is a poll action that waits for a general JavaScript predicate. It builds the predicate from a JavaScript expression. This is a copy of [page.wa
poll.go:107
↓ 2 callersFunctionPopulate
Populate is an element query option that retrieves the queried nodes for later use. Use a depth of -1 to retrieve all child nodes. When pierce is true
query.go:767
↓ 2 callersFunctionQ
(e,r,t,n,o)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionScreenshotScale
ScreenshotScale is like [Screenshot] but takes a scale parameter, which is the page scale factor.
screenshot.go:36
↓ 2 callersFunctionScrollIntoView
ScrollIntoView is an element query action that scrolls the window to the first element node matching the selector.
query.go:1411
↓ 2 callersMethodSetDebugf
SetDebugf sets the protocol logger. NewBrowserTransport calls it with the logger of the browser.
pipe.go:124
↓ 2 callersFunctionSteps
Steps joins the actions into one action that runs them in order and stops at the first error. It replaces the type Tasks.
action.go:86
↓ 2 callersMethodString
String returns the text that was written.
allocate.go:563
↓ 2 callersMethodString
String returns the text that was kept.
allocate_pipe.go:118
↓ 2 callersMethodString
String satisfies fmt.Stringer.
device/device.go:40
↓ 2 callersMethodSubscribe
Subscribe starts to buffer the target events with the method, and returns the channel that the raw event parameters arrive on. It satisfies [cdp.Sessi
target.go:350
↓ 2 callersFunctionTapXY
TapXY is an action that sends a touch tap to the X, Y location. It sends a touchStart event and then a touchEnd event with one touch point. The browse
input.go:130
↓ 2 callersFunctionTextContent
TextContent is an element query action that retrieves the text content of the first element node matching the selector.
query.go:925
↓ 2 callersFunctionVisibleWindow
VisibleWindow reports whether the tests must show the window of the browser. The variable CHROMEDP_VISIBLEWINDOW asks for it, and so does the old name
internal/testenv/testenv.go:64
↓ 2 callersFunctionWaitEnabled
WaitEnabled is an element query action that waits until the element that matches the selector is enabled (that is, it has no attribute 'disabled').
query.go:821
↓ 2 callersFunctionWaitNewTarget
WaitNewTarget waits for the current target to open a new target. When fn matches a new target that is not attached, WaitNewTarget sends its target ID
chromedp.go:1099
↓ 2 callersFunctionWithAllocatorOptions
WithAllocatorOptions makes NewContext add opts to the options of the default allocator, after [DefaultExecAllocatorOptions] and after [VisibleWindow].
chromedp.go:669
↓ 2 callersFunctionWithBrowserDebugf
WithBrowserDebugf is a browser option that sets the func that receives the protocol messages.
browser.go:559
↓ 2 callersFunctionWithConnHTTPHeader
WithConnHTTPHeader is a dial option that sets HTTP headers on the websocket handshake request. For example, a hosted browser service can need an Autho
remote/conn.go:144
↓ 2 callersFunctionWithDetachOnCancel
WithDetachOnCancel makes the cancellation of the context detach from its tab and leave the tab open. By default, the cancellation closes the tab that
chromedp.go:711
↓ 2 callersFunctionWithDialHTTPHeader
WithDialHTTPHeader is an [Option] that sets HTTP headers on the websocket handshake request to the remote browser. A hosted browser service can need a
remote/allocator.go:131
↓ 2 callersFunctionWithErrorf
WithErrorf is a shortcut for WithBrowserOption(WithBrowserErrorf(f)).
chromedp.go:840
↓ 2 callersFunctionWithKeepOpen
WithKeepOpen makes chromedp.NewContext build the default allocator with chromedp.KeepOpen and with [WebSocket]. The browser then stays open when the p
remote/keepopen.go:15
↓ 2 callersFunctionWithListener
WithListener makes the context call fn for each event of its target, from the first message of the target. It is [Listen] from the start of the target
chromedp.go:765
↓ 2 callersFunctionWithPollingInFrame
WithPollingInFrame sets the frame in which to evaluate the predicate. Without it, the action evaluates the predicate in the root page of the current t
poll.go:167
↓ 2 callersMethodWriteTo
WriteTo writes a readable representation of the node and all its children to w.
node.go:177
↓ 2 callersFunction_
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callersMethodadd
(ev any)
listen_test.go:25
↓ 2 callersFunctionaddKey
addKey is a simple map add wrapper to panic if the key is already defined, and to lookup the correct scan code.
kb/gen.go:169
↓ 2 callersFunctionae
(e,r,t,n)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionappendHeader
appendHeader appends the header of a client frame to b. The frame has the FIN bit set, the mask bit set and the given mask key. RFC 6455 section 5.2 s
remote/internal/websocket/frame.go:145
↓ 2 callersFunctionattributeMap
attributeMap returns the attributes of the node as a map.
query.go:1014
↓ 2 callersFunctionc
(e)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionce
(e,r,t)
testdata/twgl-full.min.js:6
↓ 2 callersFunctioncheckDisplay
checkDisplay returns ErrNoDisplay when the environment has no X11 and no Wayland display.
allocate_linux.go:16
↓ 2 callersFunctioncheckProse
checkProse reports each hit of proseRules in text. The first line of text is line first of the file.
docs/docs_test.go:187
↓ 2 callersFunctionclearFrameState
clearFrameState clears the frame state via bit clear (&^).
util.go:53
↓ 2 callersMethodclose
close ends all subscriptions, and makes later subscriptions end at once. A subscription first delivers the events that it already holds, so that a rea
session.go:115
↓ 2 callersMethodcloseChild
closeChild closes the ends that only the browser process needs. Calling it more than once is safe.
allocate_pipe.go:81
↓ 2 callersMethodcloseParent
closeParent closes the ends of the parent process. Calling it more than once is safe.
allocate_pipe.go:91
↓ 2 callersFunctioncollectConsole
collectConsole reads the messages until the message with the text stop.
console_test.go:18
↓ 2 callersFunctioncommandArgs
commandArgs starts a browser with a program that does not exist and returns the arguments that ModifyCmdFunc saw. Allocate fails after it, which the t
allocate_test.go:532
↓ 2 callersFunctionconsoleText
consoleText renders the arguments of a call of the console API as the DevTools console does.
console.go:267
↓ 2 callersFunctiond
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionde
(e,r,t,n,o)
testdata/twgl-full.min.js:6
↓ 2 callersFunctiondecodeReply
decodeReply returns the error of a reply to a command, or decodes its result into res. A nil msg means that the channel of the reply closed.
browser.go:306
↓ 2 callersFunctiondefaultContextFrames
defaultContextFrames returns the frames that have a default JavaScript context in the events.
listen_test.go:194
↓ 2 callersFunctiondescribe
describe returns the text of a selector for error messages.
query.go:439
↓ 2 callersMethoddial
dial connects to the websocket address wsURL with the dialer of the allocator, and returns a browser that uses the connection.
allocate.go:496
↓ 2 callersMethoddocumentUpdated
documentUpdated handles the document updated event. It retrieves the document root for the root frame.
target.go:393
↓ 2 callersMethoddropWorlds
dropWorlds forgets the isolated world of the frame with the id, or of every frame when the id is empty, because a new document has none of the old wor
target.go:166
↓ 2 callersMethodenclosingFrame
(node *Node)
target.go:70
↓ 2 callersFunctionendWith
endWith returns the session s with subscriptions that end when ctx ends. Without it, an iterator that nobody reads keeps its subscription, and a gorou
action.go:279
↓ 2 callersMethodensureFrame
ensureFrame makes sure that the top frame of this target is loaded. It returns the top frame, the root node, and the ExecutionContextID of the top fra
target.go:96
↓ 2 callersFunctionfetch
fetch downloads path from one source.
kb/gen.go:474
↓ 2 callersFunctionfindExecPath
findExecPath looks for the Chrome browser on the system. It looks in different places on different operating systems. The search can be aggressive and
allocate.go:635
↓ 2 callersMethodflagArgs
flagArgs returns the command line arguments for the flags of the allocator.
allocate.go:446
↓ 2 callersFunctionh
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionie
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionisAttacher
isAttacher reports whether a attaches to a browser that runs already. See [Attacher].
chromedp.go:437
← previousnext →201–300 of 1,064, ranked by callers