Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chromedp/chromedp
/ functions
Functions
1,064 in github.com/chromedp/chromedp
⨍
Functions
1,064
◇
Types & classes
83
↓ 5 callers
Function
RunResponse
RunResponse is an alternative to [Do] for a list of actions that trigger a page navigation, such as a click on a link or a button. RunResponse runs t
chromedp.go:871
↓ 5 callers
Method
String
String returns the name of the opcode.
remote/internal/websocket/frame.go:25
↓ 5 callers
Function
WaitReady
WaitReady is an element query action that waits until the element that matches the selector is ready (that is, "loaded").
query.go:803
↓ 5 callers
Function
WithDialer
WithDialer is an ExecAllocatorOption that makes the allocator connect to the browser with a websocket, as chromedp did before the pipe became the defa
allocate.go:915
↓ 5 callers
Function
WithLogf
WithLogf is a shortcut for WithBrowserOption(WithBrowserLogf(f)).
chromedp.go:835
↓ 5 callers
Function
WithVisibleWindow
WithVisibleWindow makes NewContext build the default allocator with [VisibleWindow] and without Headless, so that the browser opens a visible window.
chromedp.go:657
↓ 5 callers
Function
eventsOnly
eventsOnly returns a func that calls fn for each event, and skips the replies to commands that the internal listeners also get.
action.go:260
↓ 5 callers
Function
grab
grab retrieves a file from the chromium source code. It tries each source in order and returns the first file that it can download and that is not emp
kb/gen.go:461
↓ 5 callers
Function
matchPixel
(buf []byte, want string)
test/screenshot_test.go:226
↓ 5 callers
Function
waitLoad
waitLoad makes an action that runs the steps and waits until the page loads. It does not return the response.
chromedp.go:1017
↓ 5 callers
Method
waitReady
waitReady waits for the specified nodes to be ready.
query.go:332
↓ 5 callers
Function
walk
(m map[cdp.NodeID]*Node, n *Node)
util.go:60
↓ 4 callers
Function
$
()
testdata/twgl-full.min.js:6
↓ 4 callers
Function
AcceptKey
AcceptKey returns the Sec-WebSocket-Accept value for a key, as RFC 6455 section 4.2.2 describes.
remote/internal/wstest/wstest.go:52
↓ 4 callers
Method
Close
()
pipe_test.go:24
↓ 4 callers
Function
FromNode
FromNode is an element query action option that sets the node where the query runs. That is, the query looks only at the element sub-tree of the node.
query.go:389
↓ 4 callers
Function
Listen
Listen calls fn for each event of the target of the context, in the order in which the events arrive from the browser. As [Events] does, it starts the
action.go:193
↓ 4 callers
Function
Location
Location is an action that retrieves the document location.
nav.go:119
↓ 4 callers
Function
MouseClickNode
MouseClickNode is an action that dispatches a left mouse button click event at the center of a node. Note: the action scrolls the window if the node
input.go:79
↓ 4 callers
Function
N
(e,r,t)
testdata/twgl-full.min.js:6
↓ 4 callers
Function
PDFLandscape
PDFLandscape is an option of [PrintToPDF] that prints in landscape. The width and the height of the paper swap.
pdf.go:104
↓ 4 callers
Function
PDFMargin
PDFMargin is an option of [PrintToPDF] that sets the four margins to the same length in inches. The default is 1 cm, which is about 0.4 inches. A marg
pdf.go:122
↓ 4 callers
Function
PDFPaper
PDFPaper is an option of [PrintToPDF] that sets the size of the paper. Give one of the sizes of the package, such as [PaperA4], or a [PaperSize] of yo
pdf.go:113
↓ 4 callers
Method
Process
Process returns the process object of the browser. It is nil when the browser was allocated by an allocator that attaches to a browser that runs alre
browser.go:189
↓ 4 callers
Function
Screenshot
Screenshot is an element query action that takes a screenshot of the first element node that matches the selector. It acts like the command "Capture
screenshot.go:30
↓ 4 callers
Function
SendKeys
SendKeys is an element query action that sends key events to the first element node that matches the selector. It synthesizes the key down, char, and
query.go:1286
↓ 4 callers
Function
WithDebugf
WithDebugf is a shortcut for WithBrowserOption(WithBrowserDebugf(f)).
chromedp.go:845
↓ 4 callers
Function
WithNewBrowserContext
WithNewBrowserContext makes a context create a new BrowserContext and a new target in it. A child context creates its target in this BrowserContext to
chromedp.go:809
↓ 4 callers
Method
closeConn
closeConn closes the network connection once. It returns the error of the close for the first call, and nil for later calls.
remote/internal/websocket/conn.go:424
↓ 4 callers
Function
closePayload
(code uint16, reason string)
remote/internal/websocket/conn_test.go:126
↓ 4 callers
Function
defaultExecAllocatorOptions
defaultExecAllocatorOptions returns the options that NewContext uses to make the default allocator. It is the only place that builds that list from De
allocate.go:124
↓ 4 callers
Method
domEvent
domEvent handles incoming DOM events.
target.go:501
↓ 4 callers
Function
extract
extract extracts a block of next from a block of c++ code.
kb/gen.go:451
↓ 4 callers
Function
fakePipeConn
fakePipeConn returns a PipeConn that reads from in and writes to out.
pipe_test.go:27
↓ 4 callers
Function
fn
()
js/exposeFunc.js:9
↓ 4 callers
Function
newConn
newConn makes a connection on top of rwc. The dl argument can be nil. The mask keys of a connection come from a ChaCha8 generator that crypto/rand see
remote/internal/websocket/conn.go:110
↓ 4 callers
Method
noteLost
noteLost records that the connection to the browser process dropped. The allocator calls it when the connection drops without a graceful close. If the
browser.go:489
↓ 4 callers
Function
p
(e,r)
testdata/twgl-full.min.js:6
↓ 4 callers
Function
sleepContext
sleepContext sleeps for the specified duration. It returns ctx.Err() immediately if the context is canceled.
chromedp.go:1043
↓ 4 callers
Function
startKept
startKept starts a headless browser with KeepOpen and runs one action in it. The cleanup kills the browser and removes its profile directory.
remote/keepopen_test.go:99
↓ 4 callers
Function
te
(e,r,t,n)
testdata/twgl-full.min.js:6
↓ 4 callers
Function
testAllocateRuntimeDisabled
testAllocateRuntimeDisabled opens a tab with WithRuntimeDisabled in the browser of the tests, and loads the page with the name.
runtime_disabled_test.go:12
↓ 4 callers
Function
ve
(e)
testdata/twgl-full.min.js:6
↓ 4 callers
Function
w
(e,r)
testdata/twgl-full.min.js:6
↓ 4 callers
Method
writeClose
writeClose sends a close frame once, with the given payload. A later call does nothing. The write has a time limit when the connection has a deadline.
remote/internal/websocket/conn.go:365
↓ 4 callers
Method
xpath
xpath builds the xpath string.
node.go:94
↓ 3 callers
Method
AttributeValue
AttributeValue returns the named attribute for the node.
node.go:75
↓ 3 callers
Function
D
(e,r,t,n)
testdata/twgl-full.min.js:6
↓ 3 callers
Function
Detached
Detached returns a channel that closes when the browser detaches the target of the context, for example when the page closes. It returns [ErrInvalidCo
action.go:244
↓ 3 callers
Function
DragAndDropXY
DragAndDropXY is an action that drags from the point fromX, fromY and drops at the point toX, toY. The points are in CSS pixels, relative to the viewp
drag.go:156
↓ 3 callers
Function
Emulate
Emulate is an action to emulate a specific device. See [device] for a set of ready-made devices and modes.
emulate.go:99
↓ 3 callers
Function
Focus
Focus is an element query action that focuses the first element node matching the selector.
query.go:860
↓ 3 callers
Function
Handler
Handler returns the handler of NewServer, for a test that makes its own server.
remote/internal/wstest/wstest.go:122
↓ 3 callers
Function
KeyEvent
KeyEvent is a key action that synthesizes a keyDown, char, and keyUp event for each rune in keys, with any key options. Only well-known, "printable"
input.go:224
↓ 3 callers
Function
KeyModifiers
KeyModifiers is a key action option to add modifiers to the key press.
input.go:260
↓ 3 callers
Function
PDFFooterTemplate
PDFFooterTemplate is like [PDFHeaderTemplate] for the footer.
pdf.go:177
↓ 3 callers
Function
PDFMargins
PDFMargins is an option of [PrintToPDF] that sets the margins in inches. The order is the same as in CSS: top, right, bottom and left.
pdf.go:128
↓ 3 callers
Function
PDFPageRanges
PDFPageRanges is an option of [PrintToPDF] that selects the pages to print, for example "1-3, 5". The numbers start at 1. The default is all pages.
pdf.go:143
↓ 3 callers
Function
PDFScale
PDFScale is an option of [PrintToPDF] that sets the scale of the page. The default is 1, and 0 gives the default, so PDFScale(0) changes nothing. The
pdf.go:137
↓ 3 callers
Function
PDFStream
PDFStream is an option of [PrintToPDF] that makes the browser send the file as a stream that the action reads in pieces, and not in one message. Use i
pdf.go:199
↓ 3 callers
Method
Read
Read reads the next message. It returns io.EOF when the browser closes its end of the pipe.
pipe.go:71
↓ 3 callers
Function
SetAttributeValue
SetAttributeValue is an element query action that sets the element attribute with name to value for the first element node matching the selector.
query.go:1112
↓ 3 callers
Function
SetValue
SetValue is an element query action that sets the JavaScript value of the first element node matching the selector. Use it to set the JavaScript valu
query.go:1009
↓ 3 callers
Function
Targets
Targets lists the targets of the browser of the context.
chromedp.go:1026
↓ 3 callers
Function
Upgrade
Upgrade checks that the request is a WebSocket handshake, takes over the connection and writes the 101 response. The extra headers go in the response.
remote/internal/wstest/wstest.go:61
↓ 3 callers
Function
WaitClosed
WaitClosed blocks until the browser process of the context exits, for example when the user closes the last window, or until ctx ends. It returns nil
keepopen.go:89
↓ 3 callers
Function
WaitNotPresent
WaitNotPresent is an element query action that waits until no element that matches the selector is present.
query.go:833
↓ 3 callers
Function
WithBrowserOption
WithBrowserOption passes browser options to the allocator when it allocates a new browser. As a result, you can use this option only when the context
chromedp.go:852
↓ 3 callers
Function
WithExistingBrowserContext
WithExistingBrowserContext makes a context create a new target in the given BrowserContext.
chromedp.go:825
↓ 3 callers
Method
Write
Write writes a message. It is safe to call from more than one goroutine.
pipe.go:97
↓ 3 callers
Function
X
(e,r)
testdata/twgl-full.min.js:6
↓ 3 callers
Function
Z
(e,r,t)
testdata/twgl-full.min.js:6
↓ 3 callers
Function
be
(e,r)
testdata/twgl-full.min.js:6
↓ 3 callers
Function
browserAlive
browserAlive reports whether a browser listens on the websocket address.
remote/keepopen_test.go:39
↓ 3 callers
Function
consolePreview
consolePreview renders the preview of an object, for example {a: 1, b: "x"} or [1, 2, 3]. A property that does not fit ends the list with an ellipsis.
console.go:394
↓ 3 callers
Function
consoleTime
consoleTime converts a protocol timestamp, in milliseconds, to a time.
console.go:200
↓ 3 callers
Function
consoleValue
consoleValue renders one value. A string stays as it is, a primitive has its value, and an object has its description, or a short form of its properti
console.go:360
↓ 3 callers
Function
ee
(e)
testdata/twgl-full.min.js:6
↓ 3 callers
Method
execContext
execContext returns the execution context of the frame with the id, where the queries and Poll run their scripts. With the Runtime domain, it is the
target.go:138
↓ 3 callers
Function
execLocations
execLocations returns the names and paths that findExecPath tries for the operating system goos, in order.
allocate.go:649
↓ 3 callers
Method
execute
(ctx context.Context, method string, params, res any)
browser.go:247
↓ 3 callers
Function
fe
(e,r,t,n)
testdata/twgl-full.min.js:6
↓ 3 callers
Function
getCode
getCode is a simple wrapper around parsing the code definition.
kb/gen.go:160
↓ 3 callers
Function
he
(e,r,t)
testdata/twgl-full.min.js:6
↓ 3 callers
Function
headerServer
headerServer starts a websocket server that sends the headers of each handshake request to the returned channel. It holds each connection open until t
remote/conn_test.go:176
↓ 3 callers
Function
i
()
testdata/twgl-full.min.js:6
↓ 3 callers
Method
index
index returns the position of the first event for which match is true, or -1.
listen_test.go:39
↓ 3 callers
Method
ioError
ioError maps the error of a network read. A read that fails after Close reports net.ErrClosed.
remote/internal/websocket/conn.go:293
↓ 3 callers
Function
killKept
killKept kills the kept browser of ctx, waits until it exits and removes its profile directory.
remote/keepopen_test.go:52
↓ 3 callers
Function
l
(e)
testdata/twgl-full.min.js:6
↓ 3 callers
Method
logf
logf sends a line to the protocol logger, if the connection has one.
remote/conn.go:75
↓ 3 callers
Function
maskBytes
maskBytes applies the mask key to b in place, as RFC 6455 section 5.3 describes. Applying it twice gives the original bytes. The func works on eight b
remote/internal/websocket/frame.go:163
↓ 3 callers
Function
me
(e,r)
testdata/twgl-full.min.js:6
↓ 3 callers
Function
mustRead
mustRead reads one frame from the client. It gives up after a few seconds.
remote/conn_test.go:36
↓ 3 callers
Function
navigateToHistoryEntry
navigateToHistoryEntry is an action that sends Page.navigateToHistoryEntry.
nav.go:111
↓ 3 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:28
↓ 3 callers
Function
newNode
newNode converts a protocol node and its descendants into a Node tree. It moves the child links from the protocol nodes to the new nodes.
node.go:45
↓ 3 callers
Function
newTransport
newTransport makes the transport for one dial. It has no proxy, so the environment variables HTTP_PROXY and HTTPS_PROXY have no effect. It does not of
remote/internal/websocket/handshake.go:272
↓ 3 callers
Function
protocolError
protocolError returns an error that wraps [ErrProtocol].
remote/internal/websocket/close.go:67
↓ 3 callers
Function
receiveHeader
(t *testing.T, headers <-chan http.Header)
remote/conn_test.go:188
← previous
next →
101–200 of 1,064, ranked by callers