MCPcopy Create free account

hub / github.com/chromedp/chromedp / functions

Functions912 in github.com/chromedp/chromedp

↓ 2 callersFunctionScrollIntoView
ScrollIntoView is an element query action that scrolls the window to the first element node matching the selector.
query.go:1410
↓ 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:85
↓ 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:246
↓ 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:924
↓ 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:820
↓ 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:1024
↓ 2 callersFunctionWithAllocatorOptions
WithAllocatorOptions makes NewContext add opts to the options of the default allocator, after [DefaultExecAllocatorOptions] and after [VisibleWindow].
chromedp.go:650
↓ 2 callersFunctionWithBrowserDebugf
WithBrowserDebugf is a browser option that sets the func that receives the protocol messages.
browser.go:533
↓ 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:227
↓ 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:765
↓ 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 callersFunction_
(e,r)
testdata/twgl-full.min.js:6
↓ 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 callersFunctionattributeMap
attributeMap returns the attributes of the node as a map.
query.go:1013
↓ 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:305
↓ 2 callersFunctiondescribe
describe returns the text of a selector for error messages.
query.go:438
↓ 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:289
↓ 2 callersMethodenclosingFrame
(node *Node)
target.go:57
↓ 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:169
↓ 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:80
↓ 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 callersFunctionfn
()
js/exposeFunc.js:9
↓ 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:428
↓ 2 callersFunctionisCouldNotComputeBoxModelError
isCouldNotComputeBoxModelError unwraps err as a MessageError and determines if it is a compute box model error.
util.go:328
↓ 2 callersFunctionisKeepOpenDir
isKeepOpenDir reports whether dir is the user data directory of a browser that KeepOpen started, in this program or in another one.
keepopen.go:129
↓ 2 callersFunctionkeepOpenRoot
keepOpenRoot returns the directory that holds the default user data directories of KeepOpen.
keepopen.go:119
↓ 2 callersFunctionkillLeftovers
killLeftovers kills the processes that still use dir as the user data directory of a Chrome that started with it. Chrome child processes, such as the
allocate_linux.go:50
↓ 2 callersFunctionle
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionlookup
lookup returns what a selector of the type S needs. These are the text for error messages, the node IDs and the func that selects the elements. A stri
query.go:407
↓ 2 callersMethodlostError
lostError returns the error of a call that cannot finish, because the connection to the browser is lost. It wraps the reason that the connection gave.
browser.go:326
↓ 2 callersFunctionm
(e)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionmarkdown
markdown returns every document that this project writes. The skills come from elsewhere and are skipped.
docs/docs_test.go:232
↓ 2 callersFunctionnavigate
navigate is the action that sends Page.navigate, without waiting for the page to load.
nav.go:29
↓ 2 callersFunctionne
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionnewEventTarget
newEventTarget makes a target with one frame that holds the nodes. It needs no browser. The returned func gives the messages that the target logged as
target_test.go:23
↓ 2 callersFunctionnewNodes
newNodes converts a list of protocol nodes with newNode.
node.go:63
↓ 2 callersMethodnewTarget
(ctx context.Context)
chromedp.go:448
↓ 2 callersFunctionnodeCenter
nodeCenter scrolls the node into view and returns the center of its first content quad.
input.go:93
↓ 2 callersFunctionoe
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callersMethodpageEvent
pageEvent handles incoming page events.
target.go:322
↓ 2 callersFunctionpdfPages
pdfPages reads the sizes of the pages from the media boxes of the file. It works because the browser writes the page objects without compression.
pdf_test.go:30
↓ 2 callersFunctionprintPDF
(t *testing.T, page string, opts ...PDFOption)
pdf_test.go:54
↓ 2 callersFunctionptr
ptr returns a pointer to a copy of v. It sets the optional fields of the protocol types, which are pointers.
example_test.go:1064
↓ 2 callersMethodpublish
publish hands the raw parameters of an event to the subscriptions for the method. It never blocks.
session.go:89
↓ 2 callersMethodpump
pump sends the queued events to the channel, until the subscription ends.
session.go:172
↓ 2 callersFunctionq
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionquadCenter
quadCenter returns the center of the node in the viewport, as it is now. It does not scroll.
input.go:102
↓ 2 callersMethodread
read reads one frame from the client. It gives up after a few seconds.
remote/conn_test.go:50
↓ 2 callersFunctionreadOutputTo
readOutputTo is like readOutput. It also writes the output that it read before the websocket address to accumulated. A caller that gives up can then s
allocate.go:572
↓ 2 callersFunctionreadStream
readStream reads a whole stream of the browser, and closes it. It closes the stream also when the read fails or the context ended, with a new context
pdf.go:81
↓ 2 callersFunctionreadWebSocketURL
readWebSocketURL reads the websocket address from the output of a browser that started with a debugging port. It returns as soon as it finds the addre
remote/allocator_test.go:24
↓ 2 callersFunctionremoveAllRetry
removeAllRetry removes dir like os.RemoveAll. Chrome child processes, such as the crashpad handler, can still write files in dir after the main proces
allocate.go:523
↓ 2 callersFunctionremoveAllRetry
removeAllRetry removes dir. Chrome child processes can still write in dir for a short time after the main process exits, so it tries again.
remote/keepopen_test.go:27
↓ 2 callersFunctionresolveHost
resolveHost tries to resolve a host to an IP address. If the host is an IP address or "localhost", it returns the host directly.
remote/util.go:37
↓ 2 callersFunctionretryRemove
retryRemove calls remove with dir until it returns nil, or until the limit is over. It waits pause between two calls, and returns the last error.
allocate.go:529
↓ 2 callersFunctionrun
(out string)
kb/gen.go:46
↓ 2 callersFunctionrunListeners
(list []cancelableListener, ev any)
util.go:9
↓ 2 callersFunctionse
(e)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionsetFrameState
setFrameState sets the frame state via bitwise or (|).
util.go:48
↓ 2 callersFunctionskipTimeZoneEnvOnWindows
skipTimeZoneEnvOnWindows skips a test that sets the time zone of the browser with the variable TZ. The browser reads the time zone from the system on
allocate_test.go:398
↓ 2 callersFunctionstartChromeProcess
startChromeProcess is like startChrome, and it also returns the process of the browser. The test can kill the process, and then its child processes c
remote/websocket_test.go:322
↓ 2 callersMethodsubscribe
subscribe adds a subscription for the events with the method. It buffers every event from the moment that it returns. The returned func stops the subs
session.go:20
↓ 2 callersFunctionu
()
testdata/twgl-full.min.js:6
↓ 2 callersMethodusesPipe
usesPipe reports whether Allocate connects to the browser with a pipe. It does not when the allocator has a dialer or the KeepOpen option is set, or w
allocate.go:507
↓ 2 callersFunctionvisibleWindowFromEnv
visibleWindowFromEnv reports whether the environment variable CHROMEDP_VISIBLEWINDOW asks for a visible window. Any value other than the empty string,
allocate.go:872
↓ 2 callersFunctionwe
(e)
testdata/twgl-full.min.js:6
↓ 2 callersFunctionwriteHTML
(content string)
nav_test.go:345
↓ 1 callersFunctionAe
(e,r,t,n)
testdata/twgl-full.min.js:6
↓ 1 callersFunctionAllocateSeparate
AllocateSeparate returns the context of an entirely new browser, and a func that closes it. Unlike Allocate, it shares nothing with the other tests.
internal/chromedptest/chromedptest.go:253
↓ 1 callersMethodAttaches
Attaches reports whether the allocator attaches to a browser that runs already.
allocate.go:43
↓ 1 callersMethodAttribute
Attribute returns the named attribute for the node and if it exists.
node.go:81
↓ 1 callersFunctionAttributesAll
AttributesAll is an element query action that retrieves the element attributes for all element nodes matching the selector. Note: use it with a [CSSAl
query.go:1040
↓ 1 callersFunctionBlur
Blur is an element query action that unfocuses (blurs) the first element node matching the selector.
query.go:873
↓ 1 callersFunctionButton
Button is a mouse action option to set the button to click from a string.
input.go:159
← previousnext →201–300 of 912, ranked by callers