Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chromedp/chromedp
/ functions
Functions
912 in github.com/chromedp/chromedp
⨍
Functions
912
◇
Types & classes
69
↓ 2 callers
Function
ScrollIntoView
ScrollIntoView is an element query action that scrolls the window to the first element node matching the selector.
query.go:1410
↓ 2 callers
Method
SetDebugf
SetDebugf sets the protocol logger. NewBrowserTransport calls it with the logger of the browser.
pipe.go:124
↓ 2 callers
Function
Steps
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 callers
Method
String
String returns the text that was written.
allocate.go:563
↓ 2 callers
Method
String
String returns the text that was kept.
allocate_pipe.go:118
↓ 2 callers
Method
String
String satisfies fmt.Stringer.
device/device.go:40
↓ 2 callers
Method
Subscribe
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 callers
Function
TapXY
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 callers
Function
TextContent
TextContent is an element query action that retrieves the text content of the first element node matching the selector.
query.go:924
↓ 2 callers
Function
VisibleWindow
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 callers
Function
WaitEnabled
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 callers
Function
WaitNewTarget
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 callers
Function
WithAllocatorOptions
WithAllocatorOptions makes NewContext add opts to the options of the default allocator, after [DefaultExecAllocatorOptions] and after [VisibleWindow].
chromedp.go:650
↓ 2 callers
Function
WithBrowserDebugf
WithBrowserDebugf is a browser option that sets the func that receives the protocol messages.
browser.go:533
↓ 2 callers
Function
WithConnHTTPHeader
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 callers
Function
WithDialHTTPHeader
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 callers
Function
WithErrorf
WithErrorf is a shortcut for WithBrowserOption(WithBrowserErrorf(f)).
chromedp.go:765
↓ 2 callers
Function
WithKeepOpen
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 callers
Function
_
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
addKey
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 callers
Function
ae
(e,r,t,n)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
attributeMap
attributeMap returns the attributes of the node as a map.
query.go:1013
↓ 2 callers
Function
c
(e)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
ce
(e,r,t)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
checkDisplay
checkDisplay returns ErrNoDisplay when the environment has no X11 and no Wayland display.
allocate_linux.go:16
↓ 2 callers
Function
checkProse
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 callers
Function
clearFrameState
clearFrameState clears the frame state via bit clear (&^).
util.go:53
↓ 2 callers
Method
close
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 callers
Method
closeChild
closeChild closes the ends that only the browser process needs. Calling it more than once is safe.
allocate_pipe.go:81
↓ 2 callers
Method
closeParent
closeParent closes the ends of the parent process. Calling it more than once is safe.
allocate_pipe.go:91
↓ 2 callers
Function
collectConsole
collectConsole reads the messages until the message with the text stop.
console_test.go:18
↓ 2 callers
Function
commandArgs
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 callers
Function
consoleText
consoleText renders the arguments of a call of the console API as the DevTools console does.
console.go:267
↓ 2 callers
Function
d
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
de
(e,r,t,n,o)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
decodeReply
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 callers
Function
describe
describe returns the text of a selector for error messages.
query.go:438
↓ 2 callers
Method
dial
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 callers
Method
documentUpdated
documentUpdated handles the document updated event. It retrieves the document root for the root frame.
target.go:289
↓ 2 callers
Method
enclosingFrame
(node *Node)
target.go:57
↓ 2 callers
Function
endWith
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 callers
Method
ensureFrame
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 callers
Function
fetch
fetch downloads path from one source.
kb/gen.go:474
↓ 2 callers
Function
findExecPath
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 callers
Method
flagArgs
flagArgs returns the command line arguments for the flags of the allocator.
allocate.go:446
↓ 2 callers
Function
fn
()
js/exposeFunc.js:9
↓ 2 callers
Function
h
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
ie
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
isAttacher
isAttacher reports whether a attaches to a browser that runs already. See [Attacher].
chromedp.go:428
↓ 2 callers
Function
isCouldNotComputeBoxModelError
isCouldNotComputeBoxModelError unwraps err as a MessageError and determines if it is a compute box model error.
util.go:328
↓ 2 callers
Function
isKeepOpenDir
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 callers
Function
keepOpenRoot
keepOpenRoot returns the directory that holds the default user data directories of KeepOpen.
keepopen.go:119
↓ 2 callers
Function
killLeftovers
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 callers
Function
le
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
lookup
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 callers
Method
lostError
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 callers
Function
m
(e)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
markdown
markdown returns every document that this project writes. The skills come from elsewhere and are skipped.
docs/docs_test.go:232
↓ 2 callers
Function
navigate
navigate is the action that sends Page.navigate, without waiting for the page to load.
nav.go:29
↓ 2 callers
Function
ne
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
newEventTarget
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 callers
Function
newNodes
newNodes converts a list of protocol nodes with newNode.
node.go:63
↓ 2 callers
Method
newTarget
(ctx context.Context)
chromedp.go:448
↓ 2 callers
Function
nodeCenter
nodeCenter scrolls the node into view and returns the center of its first content quad.
input.go:93
↓ 2 callers
Function
oe
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callers
Method
pageEvent
pageEvent handles incoming page events.
target.go:322
↓ 2 callers
Function
pdfPages
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 callers
Function
printPDF
(t *testing.T, page string, opts ...PDFOption)
pdf_test.go:54
↓ 2 callers
Function
ptr
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 callers
Method
publish
publish hands the raw parameters of an event to the subscriptions for the method. It never blocks.
session.go:89
↓ 2 callers
Method
pump
pump sends the queued events to the channel, until the subscription ends.
session.go:172
↓ 2 callers
Function
q
(e,r)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
quadCenter
quadCenter returns the center of the node in the viewport, as it is now. It does not scroll.
input.go:102
↓ 2 callers
Method
read
read reads one frame from the client. It gives up after a few seconds.
remote/conn_test.go:50
↓ 2 callers
Function
readOutputTo
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 callers
Function
readStream
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 callers
Function
readWebSocketURL
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 callers
Function
removeAllRetry
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 callers
Function
removeAllRetry
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 callers
Function
resolveHost
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 callers
Function
retryRemove
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 callers
Function
run
(out string)
kb/gen.go:46
↓ 2 callers
Function
runListeners
(list []cancelableListener, ev any)
util.go:9
↓ 2 callers
Function
se
(e)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
setFrameState
setFrameState sets the frame state via bitwise or (|).
util.go:48
↓ 2 callers
Function
skipTimeZoneEnvOnWindows
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 callers
Function
startChromeProcess
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 callers
Method
subscribe
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 callers
Function
u
()
testdata/twgl-full.min.js:6
↓ 2 callers
Method
usesPipe
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 callers
Function
visibleWindowFromEnv
visibleWindowFromEnv reports whether the environment variable CHROMEDP_VISIBLEWINDOW asks for a visible window. Any value other than the empty string,
allocate.go:872
↓ 2 callers
Function
we
(e)
testdata/twgl-full.min.js:6
↓ 2 callers
Function
writeHTML
(content string)
nav_test.go:345
↓ 1 callers
Function
Ae
(e,r,t,n)
testdata/twgl-full.min.js:6
↓ 1 callers
Function
AllocateSeparate
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 callers
Method
Attaches
Attaches reports whether the allocator attaches to a browser that runs already.
allocate.go:43
↓ 1 callers
Method
Attribute
Attribute returns the named attribute for the node and if it exists.
node.go:81
↓ 1 callers
Function
AttributesAll
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 callers
Function
Blur
Blur is an element query action that unfocuses (blurs) the first element node matching the selector.
query.go:873
↓ 1 callers
Function
Button
Button is a mouse action option to set the button to click from a string.
input.go:159
← previous
next →
201–300 of 912, ranked by callers