MCPcopy Create free account

hub / github.com/chromedp/chromedp / functions

Functions1,064 in github.com/chromedp/chromedp

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
FunctionBenchmarkRoundTrip
BenchmarkRoundTrip sends a text message to an echo server and reads the echo. The server is the independent one of the package wstest.
remote/internal/websocket/bench_test.go:14
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:232
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
MethodClose
()
browser_test.go:143
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:508
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
FunctionFuzzReadFrame
FuzzReadFrame feeds arbitrary bytes to the reader. The reader must not panic, must not hang, and must return one of the documented errors. It must nev
remote/internal/websocket/fuzz_test.go:13
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:1145
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:687
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:724
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:660
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:705
FunctionNodeVisible
NodeVisible is an element query option that waits until the browser has sent all queried element nodes and they are visible.
query.go:634
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:116
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
(ctx context.Context, msg *cdproto.Message)
browser_test.go:116
MethodRead
Read reads the next message. It answers a ping frame with a pong frame and skips a pong frame, as RFC 6455 section 5.5 requires. A server can send a p
remote/conn.go:96
MethodRead
(p []byte)
remote/internal/websocket/conn_test.go:25
FunctionResetViewport
ResetViewport is an action that resets the browser viewport to the values that the browser started with. Note: it does not change the emulated User-A
emulate.go:84
MethodSetDebugf
SetDebugf sets the protocol logger. chromedp.NewBrowserTransport calls it with the logger of the browser.
remote/conn.go:83
FunctionSleep
Sleep is an action that waits for the duration, or until the context ends.
action.go:337
MethodString
String satisfies stringer interface.
node.go:352
MethodString
String returns the output that was kept.
allocate_pipe.go:181
MethodString
String satisfies stringer interface.
frame.go:52
MethodString
String satisfies fmt.Stringer.
device/device.go:53
MethodSubscribe
Subscribe starts to buffer the browser events with the method, and returns the channel that the raw event parameters arrive on. It satisfies [cdp.Sess
browser.go:243
MethodSubscribe
Subscribe subscribes on the session, and ends the subscription when the context ends.
action.go:285
FunctionT
(e,r,t,n)
testdata/twgl-full.min.js:6
← previousnext →601–700 of 1,064, ranked by callers