MCPcopy Create free account

hub / github.com/chromedp/chromedp / functions

Functions912 in github.com/chromedp/chromedp

↓ 1 callersFunctiontagEvent
tagEvent wraps the parameters of an event in a JSON object with the method.
session.go:102
↓ 1 callersFunctiontestAllocator
(t *testing.T, modifyURL func(wsURL string) string, wantErr string, opts []Option)
remote/allocator_test.go:101
↓ 1 callersFunctiontestConnAnswersPing
(t *testing.T, delay time.Duration)
remote/conn_test.go:74
↓ 1 callersFunctiontextContentTest
textContentTest returns a test for TestTextContent that selects the element with sel.
query_test.go:518
↓ 1 callersFunctiontextTest
textTest returns a test for TestText that selects the element with sel.
query_test.go:488
↓ 1 callersFunctionvalueKind
valueKind names the kind of a value for an error message.
query.go:553
↓ 1 callersFunctionvalueTest
valueTest returns a test for TestValue that selects the element with sel.
query_test.go:644
↓ 1 callersFunctionvisible
()
js/visible.js:1
↓ 1 callersMethodwaitActivePort
waitActivePort waits until the browser writes the file DevToolsActivePort, and returns the websocket address in it. The first line of the file is the
keepopen.go:248
↓ 1 callersFunctionwaitGoroutines
waitGoroutines waits until the number of goroutines is at most max, or the time limit ends, and returns the number. With max 0 it waits for the limit
console_test.go:312
↓ 1 callersFunctionwaitNoRunnerDirs
waitNoRunnerDirs waits until dir has no entry that the allocator made, or until the timeout.
internal/chromedptest/chromedptest.go:166
↓ 1 callersFunctionwaitTargetGone
waitTargetGone polls the browser until the target with the given id is no longer listed, or until ctx is done.
chromedp.go:1062
↓ 1 callersFunctionwindowID
windowID returns the id of the window of the tab of ctx.
newwindow_test.go:14
↓ 1 callersMethodwrite
(t *testing.T, f ws.Frame)
remote/conn_test.go:42
↓ 1 callersMethodwritePong
writePong sends a pong frame with the payload of a ping frame. A client must mask every frame that it sends. The write lock keeps the frame apart from
remote/conn.go:179
FunctionA
(e,r,t,n,o)
testdata/twgl-full.min.js:6
MethodAllocate
Allocate satisfies the Allocator interface. It returns [ErrNoDialer] when the allocator needs a websocket and has no dialer.
allocate.go:206
MethodAllocate
Allocate satisfies the chromedp.Allocator interface.
remote/allocator.go:64
MethodAttaches
Attaches satisfies the chromedp.Attacher interface. It always returns true, because the allocator connects to a browser that runs already.
remote/allocator.go:113
FunctionBenchmarkTabNavigate
(b *testing.B)
chromedp_test.go:209
FunctionBrowserContext
BrowserContext returns the context of the shared browser that Allocate starts. It is nil before the first call of Allocate.
internal/chromedptest/chromedptest.go:247
FunctionButtonLeft
ButtonLeft is a mouse action option to set the button clicked as the left mouse button.
input.go:172
FunctionButtonMiddle
ButtonMiddle is a mouse action option to set the button clicked as the middle mouse button.
input.go:178
FunctionButtonNone
ButtonNone is a mouse action option to set the button clicked as none (used for mouse movements).
input.go:190
FunctionButtonRight
ButtonRight is a mouse action option to set the button clicked as the right mouse button.
input.go:184
MethodCall
Call sends the command to the browser, waits for the response, and decodes the result into res. It satisfies [cdp.Session]. Call returns a browser er
browser.go:231
FunctionCallFunctionOn
CallFunctionOn is an action that calls a JavaScript function and decodes the result of the function into the type T. T is handled as in [Evaluate]. A
call.go:59
MethodDevice
Device satisfies chromedp.Device.
device/device.go:45
MethodDevice
Device satisfies chromedp.Device.
device/device.go:58
FunctionDisableGPU
DisableGPU is the command line option to disable the GPU process. The --disable-gpu option is a temporary workaround for a few bugs in headless mode.
allocate.go:891
MethodDo
(ctx context.Context)
example_test.go:1000
FunctionE
(e,r,t)
testdata/twgl-full.min.js:6
FunctionEmulateLandscape
EmulateLandscape is an emulate viewport option to set the device viewport screen orientation in landscape primary mode and an angle of 90.
emulate.go:59
FunctionEmulateMobile
EmulateMobile is an emulate viewport option to toggle the device viewport to display as a mobile device.
emulate.go:71
FunctionEmulatePortrait
EmulatePortrait is an emulate viewport option to set the device viewport screen orientation in portrait primary mode and an angle of 0.
emulate.go:65
FunctionEmulateReset
EmulateReset is an action that resets the device emulation. It resets the viewport, the screen orientation, the user agent, and the mobile and touch
emulate.go:134
FunctionEmulateTouch
EmulateTouch is an emulate viewport option to enable touch emulation.
emulate.go:76
MethodError
Error satisfies the error interface.
browser.go:482
MethodError
Error satisfies the error interface.
errors.go:17
MethodError
Error satisfies the error interface. The text is the same as in earlier versions.
errors.go:45
FunctionEvalAsValue
EvalAsValue is an evaluate option that makes the evaluation encode the result of the expression as a JSON-encoded value.
eval.go:166
FunctionEvalAwaitPromise
EvalAwaitPromise is an evaluate option that makes the evaluation wait for a promise that the expression returns, and use its result. A promise that is
eval.go:160
FunctionEvalIgnoreExceptions
EvalIgnoreExceptions is an evaluate option that makes the evaluation ignore exceptions.
eval.go:149
FunctionEvalWithCommandLineAPI
EvalWithCommandLineAPI is an evaluate option that makes the DevTools Command Line API available to the evaluated script. See [Evaluate] for how evalu
eval.go:143
FunctionEvaluate
Evaluate is an action that evaluates the JavaScript expression and decodes the result of the script into the type T. When T is [Void], Evaluate ignor
eval.go:37
FunctionEvaluateAsDevTools
EvaluateAsDevTools is an action that evaluates a JavaScript expression as Chrome DevTools does. It evaluates the expression in the "console" context a
eval.go:123
FunctionExampleCall
()
example_test.go:961
FunctionExampleClick
()
example_test.go:863
FunctionExampleEmulate
()
example_test.go:420
FunctionExampleEvaluate
()
example_test.go:712
FunctionExampleEvents_acceptAlert
()
example_test.go:342
FunctionExampleEvents_consoleLog
()
example_test.go:244
FunctionExampleEvents_network
()
example_test.go:926
FunctionExampleExecAllocator
()
example_test.go:126
FunctionExampleFromNode
()
example_test.go:537
FunctionExampleFullScreenshot
()
example_test.go:692
FunctionExampleJSPath
()
example_test.go:504
FunctionExampleLegacy
()
example_test.go:1011
FunctionExampleNewAllocator
This example attaches to a browser that an earlier program left open.
remote/example_test.go:86
FunctionExampleNewContext_manyTabs
()
example_test.go:215
FunctionExampleNewContext_reuseBrowser
()
example_test.go:165
FunctionExamplePrintToPDF
()
example_test.go:446
FunctionExamplePrintToPDF_options
()
example_test.go:477
FunctionExampleRunResponse
()
example_test.go:60
FunctionExampleSelectable
()
example_test.go:804
FunctionExampleSendKeys
()
example_test.go:894
FunctionExampleTitle
()
example_test.go:33
FunctionExampleVisibleWindow
This example shows the allocator options. They work with NewExecAllocator, when the program makes its own allocator.
example_test.go:1046
FunctionExampleWaitNewTarget
()
example_test.go:307
FunctionExampleWebSocket
This example makes the exec allocator connect with a websocket. The browser then opens a debugging port and writes the file DevToolsActivePort in its
remote/example_test.go:20
FunctionExampleWithDialHTTPHeader
This example connects to a hosted browser service that needs an Authorization header on the websocket request.
remote/example_test.go:103
FunctionExampleWithKeepOpen
This example leaves the browser open when the program ends. The program prints the address, so that another program can attach with NewAllocator. The
remote/example_test.go:72
FunctionExampleWithVisibleWindow
This example opens a visible window and waits until the user closes it. The variable CHROMEDP_VISIBLEWINDOW=1 has the same effect as the option.
example_test.go:1033
FunctionExample_documentDump
()
example_test.go:638
FunctionExample_dump
()
example_test.go:589
FunctionExample_retrieveHTML
()
example_test.go:378
MethodFullXPathByID
FullXPathByID returns the full XPath for the node. It stops at the top most document root or at the closest parent node with an id attribute.
node.go:166
FunctionHeadless
Headless is the command line option to run in headless mode. It sets the headless flag, hides scrollbars, and mutes audio.
allocate.go:825
FunctionIgnoreCertErrors
IgnoreCertErrors is the command line option to ignore certificate errors. Use it to access an HTTPS website through a proxy.
allocate.go:791
MethodInt64
Int64 returns the Modifier as an int64 value.
kb/event.go:34
FunctionJavascriptAttribute
JavascriptAttribute is an element query action that retrieves the JavaScript attribute for the first element node matching the selector. It decodes th
query.go:1144
FunctionKeepOpen
KeepOpen is an ExecAllocatorOption that leaves the browser open when the Go program ends or when the context is canceled. Use it to look at the page a
keepopen.go:60
FunctionMouseEvent
MouseEvent is a mouse event action to dispatch the specified mouse event type at coordinates x, y.
input.go:35
FunctionNoDefaultBrowserCheck
NoDefaultBrowserCheck is the Chrome command line option to disable the default browser check.
allocate.go:819
FunctionNoFirstRun
NoFirstRun is the Chrome command line option to disable the first run dialog.
allocate.go:813
FunctionNoInheritEnv
NoInheritEnv is an allocator option that starts the browser with only the variables that [Env] gives, and the variables that a func of [ModifyCmdFunc]
allocate.go:747
FunctionNoModifyURL
NoModifyURL is an [Option] that prevents the allocator from modifying the websocket debugger URL passed to it.
remote/allocator.go:148
FunctionNoSandbox
NoSandbox is the Chrome command line option to disable the sandbox.
allocate.go:807
FunctionNodeEnabled
NodeEnabled is an element query option that waits until the browser has sent all queried element nodes. The nodes must be enabled (that is, they have
query.go:686
FunctionNodeNotPresent
NodeNotPresent is an element query option that waits until no element matches the query. Note: it sets the expected number of element nodes to 0.
query.go:723
FunctionNodeNotVisible
NodeNotVisible is an element query option that waits until the browser has sent all queried element nodes and they are not visible.
query.go:659
FunctionNodeSelected
NodeSelected is an element query option that waits until the browser has sent all queried element nodes. The nodes must be selected (that is, they hav
query.go:704
FunctionNodeVisible
NodeVisible is an element query option that waits until the browser has sent all queried element nodes and they are visible.
query.go:633
FunctionP
(e,r)
testdata/twgl-full.min.js:6
MethodPartialXPath
PartialXPath returns the partial XPath for the node. It stops at the nearest parent document node.
node.go:160
MethodPartialXPathByID
PartialXPathByID returns the partial XPath for the node. It stops at the first parent with an id attribute or at the nearest parent document node.
node.go:154
FunctionPollFunction
PollFunction is a poll action that waits for a general JavaScript predicate. It builds the predicate from a JavaScript function. See [Poll] for how t
poll.go:114
FunctionProxyServer
ProxyServer is the command line option to set the outbound proxy server.
allocate.go:785
FunctionR
(e,r)
testdata/twgl-full.min.js:6
MethodRead
Read reads from the buffer, and then from the connection.
remote/conn.go:95
← previousnext →501–600 of 912, ranked by callers