MCPcopy Create free account

hub / github.com/chromedp/chromedp / functions

Functions1,064 in github.com/chromedp/chromedp

↓ 5 callersFunctionRunResponse
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 callersMethodString
String returns the name of the opcode.
remote/internal/websocket/frame.go:25
↓ 5 callersFunctionWaitReady
WaitReady is an element query action that waits until the element that matches the selector is ready (that is, "loaded").
query.go:803
↓ 5 callersFunctionWithDialer
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 callersFunctionWithLogf
WithLogf is a shortcut for WithBrowserOption(WithBrowserLogf(f)).
chromedp.go:835
↓ 5 callersFunctionWithVisibleWindow
WithVisibleWindow makes NewContext build the default allocator with [VisibleWindow] and without Headless, so that the browser opens a visible window.
chromedp.go:657
↓ 5 callersFunctioneventsOnly
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 callersFunctiongrab
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 callersFunctionmatchPixel
(buf []byte, want string)
test/screenshot_test.go:226
↓ 5 callersFunctionwaitLoad
waitLoad makes an action that runs the steps and waits until the page loads. It does not return the response.
chromedp.go:1017
↓ 5 callersMethodwaitReady
waitReady waits for the specified nodes to be ready.
query.go:332
↓ 5 callersFunctionwalk
(m map[cdp.NodeID]*Node, n *Node)
util.go:60
↓ 4 callersFunction$
()
testdata/twgl-full.min.js:6
↓ 4 callersFunctionAcceptKey
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 callersMethodClose
()
pipe_test.go:24
↓ 4 callersFunctionFromNode
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 callersFunctionListen
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 callersFunctionLocation
Location is an action that retrieves the document location.
nav.go:119
↓ 4 callersFunctionMouseClickNode
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 callersFunctionN
(e,r,t)
testdata/twgl-full.min.js:6
↓ 4 callersFunctionPDFLandscape
PDFLandscape is an option of [PrintToPDF] that prints in landscape. The width and the height of the paper swap.
pdf.go:104
↓ 4 callersFunctionPDFMargin
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 callersFunctionPDFPaper
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 callersMethodProcess
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 callersFunctionScreenshot
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 callersFunctionSendKeys
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 callersFunctionWithDebugf
WithDebugf is a shortcut for WithBrowserOption(WithBrowserDebugf(f)).
chromedp.go:845
↓ 4 callersFunctionWithNewBrowserContext
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 callersMethodcloseConn
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 callersFunctionclosePayload
(code uint16, reason string)
remote/internal/websocket/conn_test.go:126
↓ 4 callersFunctiondefaultExecAllocatorOptions
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 callersMethoddomEvent
domEvent handles incoming DOM events.
target.go:501
↓ 4 callersFunctionextract
extract extracts a block of next from a block of c++ code.
kb/gen.go:451
↓ 4 callersFunctionfakePipeConn
fakePipeConn returns a PipeConn that reads from in and writes to out.
pipe_test.go:27
↓ 4 callersFunctionfn
()
js/exposeFunc.js:9
↓ 4 callersFunctionnewConn
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 callersMethodnoteLost
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 callersFunctionp
(e,r)
testdata/twgl-full.min.js:6
↓ 4 callersFunctionsleepContext
sleepContext sleeps for the specified duration. It returns ctx.Err() immediately if the context is canceled.
chromedp.go:1043
↓ 4 callersFunctionstartKept
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 callersFunctionte
(e,r,t,n)
testdata/twgl-full.min.js:6
↓ 4 callersFunctiontestAllocateRuntimeDisabled
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 callersFunctionve
(e)
testdata/twgl-full.min.js:6
↓ 4 callersFunctionw
(e,r)
testdata/twgl-full.min.js:6
↓ 4 callersMethodwriteClose
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 callersMethodxpath
xpath builds the xpath string.
node.go:94
↓ 3 callersMethodAttributeValue
AttributeValue returns the named attribute for the node.
node.go:75
↓ 3 callersFunctionD
(e,r,t,n)
testdata/twgl-full.min.js:6
↓ 3 callersFunctionDetached
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 callersFunctionDragAndDropXY
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 callersFunctionEmulate
Emulate is an action to emulate a specific device. See [device] for a set of ready-made devices and modes.
emulate.go:99
↓ 3 callersFunctionFocus
Focus is an element query action that focuses the first element node matching the selector.
query.go:860
↓ 3 callersFunctionHandler
Handler returns the handler of NewServer, for a test that makes its own server.
remote/internal/wstest/wstest.go:122
↓ 3 callersFunctionKeyEvent
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 callersFunctionKeyModifiers
KeyModifiers is a key action option to add modifiers to the key press.
input.go:260
↓ 3 callersFunctionPDFFooterTemplate
PDFFooterTemplate is like [PDFHeaderTemplate] for the footer.
pdf.go:177
↓ 3 callersFunctionPDFMargins
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 callersFunctionPDFPageRanges
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 callersFunctionPDFScale
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 callersFunctionPDFStream
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 callersMethodRead
Read reads the next message. It returns io.EOF when the browser closes its end of the pipe.
pipe.go:71
↓ 3 callersFunctionSetAttributeValue
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 callersFunctionSetValue
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 callersFunctionTargets
Targets lists the targets of the browser of the context.
chromedp.go:1026
↓ 3 callersFunctionUpgrade
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 callersFunctionWaitClosed
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 callersFunctionWaitNotPresent
WaitNotPresent is an element query action that waits until no element that matches the selector is present.
query.go:833
↓ 3 callersFunctionWithBrowserOption
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 callersFunctionWithExistingBrowserContext
WithExistingBrowserContext makes a context create a new target in the given BrowserContext.
chromedp.go:825
↓ 3 callersMethodWrite
Write writes a message. It is safe to call from more than one goroutine.
pipe.go:97
↓ 3 callersFunctionX
(e,r)
testdata/twgl-full.min.js:6
↓ 3 callersFunctionZ
(e,r,t)
testdata/twgl-full.min.js:6
↓ 3 callersFunctionbe
(e,r)
testdata/twgl-full.min.js:6
↓ 3 callersFunctionbrowserAlive
browserAlive reports whether a browser listens on the websocket address.
remote/keepopen_test.go:39
↓ 3 callersFunctionconsolePreview
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 callersFunctionconsoleTime
consoleTime converts a protocol timestamp, in milliseconds, to a time.
console.go:200
↓ 3 callersFunctionconsoleValue
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 callersFunctionee
(e)
testdata/twgl-full.min.js:6
↓ 3 callersMethodexecContext
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 callersFunctionexecLocations
execLocations returns the names and paths that findExecPath tries for the operating system goos, in order.
allocate.go:649
↓ 3 callersMethodexecute
(ctx context.Context, method string, params, res any)
browser.go:247
↓ 3 callersFunctionfe
(e,r,t,n)
testdata/twgl-full.min.js:6
↓ 3 callersFunctiongetCode
getCode is a simple wrapper around parsing the code definition.
kb/gen.go:160
↓ 3 callersFunctionhe
(e,r,t)
testdata/twgl-full.min.js:6
↓ 3 callersFunctionheaderServer
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 callersFunctioni
()
testdata/twgl-full.min.js:6
↓ 3 callersMethodindex
index returns the position of the first event for which match is true, or -1.
listen_test.go:39
↓ 3 callersMethodioError
ioError maps the error of a network read. A read that fails after Close reports net.ErrClosed.
remote/internal/websocket/conn.go:293
↓ 3 callersFunctionkillKept
killKept kills the kept browser of ctx, waits until it exits and removes its profile directory.
remote/keepopen_test.go:52
↓ 3 callersFunctionl
(e)
testdata/twgl-full.min.js:6
↓ 3 callersMethodlogf
logf sends a line to the protocol logger, if the connection has one.
remote/conn.go:75
↓ 3 callersFunctionmaskBytes
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 callersFunctionme
(e,r)
testdata/twgl-full.min.js:6
↓ 3 callersFunctionmustRead
mustRead reads one frame from the client. It gives up after a few seconds.
remote/conn_test.go:36
↓ 3 callersFunctionnavigateToHistoryEntry
navigateToHistoryEntry is an action that sends Page.navigateToHistoryEntry.
nav.go:111
↓ 3 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:28
↓ 3 callersFunctionnewNode
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 callersFunctionnewTransport
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 callersFunctionprotocolError
protocolError returns an error that wraps [ErrProtocol].
remote/internal/websocket/close.go:67
↓ 3 callersFunctionreceiveHeader
(t *testing.T, headers <-chan http.Header)
remote/conn_test.go:188
← previousnext →101–200 of 1,064, ranked by callers