MCPcopy Create free account

hub / github.com/chromedp/chromedp / functions

Functions912 in github.com/chromedp/chromedp

↓ 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:734
↓ 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 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 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:463
↓ 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:968
↓ 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 callersFunctionve
(e)
testdata/twgl-full.min.js:6
↓ 4 callersFunctionw
(e,r)
testdata/twgl-full.min.js:6
↓ 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 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:859
↓ 3 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:388
↓ 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:1111
↓ 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:1008
↓ 3 callersFunctionTargets
Targets lists the targets of the browser of the context.
chromedp.go:951
↓ 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:832
↓ 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:777
↓ 3 callersFunctionWithExistingBrowserContext
WithExistingBrowserContext makes a context create a new target in the given BrowserContext.
chromedp.go:750
↓ 3 callersMethodWrite
Write writes a message. It is safe to call from more than one goroutine.
pipe.go:97
↓ 3 callersMethodWriteTo
WriteTo writes a readable representation of the node and all its children to w.
node.go:177
↓ 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 callersMethoddomEvent
domEvent handles incoming DOM events.
target.go:394
↓ 3 callersFunctionee
(e)
testdata/twgl-full.min.js:6
↓ 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:246
↓ 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:195
↓ 3 callersFunctioni
()
testdata/twgl-full.min.js:6
↓ 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 callersMethodlisten
listen adds a func that the target calls for each event. Canceling ctx stops the calls. The target calls the func synchronously, so the func must not
chromedp.go:1007
↓ 3 callersFunctionme
(e,r)
testdata/twgl-full.min.js:6
↓ 3 callersFunctionnavigateToHistoryEntry
navigateToHistoryEntry is an action that sends Page.navigateToHistoryEntry.
nav.go:111
↓ 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 callersFunctionnewWebsocketServer
newWebsocketServer starts a server that upgrades each request to a websocket and passes the connection to handle. It returns the ws address.
remote/conn_test.go:18
↓ 3 callersFunctionreceiveHeader
(t *testing.T, headers <-chan http.Header)
remote/conn_test.go:207
↓ 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:802
↓ 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 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:496
↓ 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:755
↓ 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:1027
↓ 2 callersFunctionBrowserEvents
BrowserEvents is like [Events] for the events of the browser, such as the events of the target domain. It replaces ListenBrowser.
action.go:151
↓ 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:395
↓ 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 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 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:1187
↓ 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:105
↓ 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:766
↓ 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
← previousnext →101–200 of 912, ranked by callers