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
Function
A
(e,r,t,n,o)
testdata/twgl-full.min.js:6
Method
Allocate
Allocate satisfies the Allocator interface. It returns [ErrNoDialer] when the allocator needs a websocket and has no dialer.
allocate.go:206
Method
Allocate
Allocate satisfies the chromedp.Allocator interface.
remote/allocator.go:64
Method
Attaches
Attaches satisfies the chromedp.Attacher interface. It always returns true, because the allocator connects to a browser that runs already.
remote/allocator.go:113
Function
BenchmarkRoundTrip
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
Function
BenchmarkTabNavigate
(b *testing.B)
chromedp_test.go:209
Function
BrowserContext
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
Function
ButtonLeft
ButtonLeft is a mouse action option to set the button clicked as the left mouse button.
input.go:172
Function
ButtonMiddle
ButtonMiddle is a mouse action option to set the button clicked as the middle mouse button.
input.go:178
Function
ButtonNone
ButtonNone is a mouse action option to set the button clicked as none (used for mouse movements).
input.go:190
Function
ButtonRight
ButtonRight is a mouse action option to set the button clicked as the right mouse button.
input.go:184
Method
Call
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
Function
CallFunctionOn
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
Method
Close
()
browser_test.go:143
Method
Device
Device satisfies chromedp.Device.
device/device.go:45
Method
Device
Device satisfies chromedp.Device.
device/device.go:58
Function
DisableGPU
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
Method
Do
(ctx context.Context)
example_test.go:1000
Function
E
(e,r,t)
testdata/twgl-full.min.js:6
Function
EmulateLandscape
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
Function
EmulateMobile
EmulateMobile is an emulate viewport option to toggle the device viewport to display as a mobile device.
emulate.go:71
Function
EmulatePortrait
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
Function
EmulateReset
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
Function
EmulateTouch
EmulateTouch is an emulate viewport option to enable touch emulation.
emulate.go:76
Method
Error
Error satisfies the error interface.
browser.go:508
Method
Error
Error satisfies the error interface.
errors.go:17
Method
Error
Error satisfies the error interface. The text is the same as in earlier versions.
errors.go:45
Function
EvalAsValue
EvalAsValue is an evaluate option that makes the evaluation encode the result of the expression as a JSON-encoded value.
eval.go:166
Function
EvalAwaitPromise
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
Function
EvalIgnoreExceptions
EvalIgnoreExceptions is an evaluate option that makes the evaluation ignore exceptions.
eval.go:149
Function
EvalWithCommandLineAPI
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
Function
Evaluate
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
Function
EvaluateAsDevTools
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
Function
ExampleCall
()
example_test.go:961
Function
ExampleClick
()
example_test.go:863
Function
ExampleEmulate
()
example_test.go:420
Function
ExampleEvaluate
()
example_test.go:712
Function
ExampleEvents_acceptAlert
()
example_test.go:342
Function
ExampleEvents_consoleLog
()
example_test.go:244
Function
ExampleEvents_network
()
example_test.go:926
Function
ExampleExecAllocator
()
example_test.go:126
Function
ExampleFromNode
()
example_test.go:537
Function
ExampleFullScreenshot
()
example_test.go:692
Function
ExampleJSPath
()
example_test.go:504
Function
ExampleLegacy
()
example_test.go:1011
Function
ExampleNewAllocator
This example attaches to a browser that an earlier program left open.
remote/example_test.go:86
Function
ExampleNewContext_manyTabs
()
example_test.go:215
Function
ExampleNewContext_reuseBrowser
()
example_test.go:165
Function
ExamplePrintToPDF
()
example_test.go:446
Function
ExamplePrintToPDF_options
()
example_test.go:477
Function
ExampleRunResponse
()
example_test.go:60
Function
ExampleSelectable
()
example_test.go:804
Function
ExampleSendKeys
()
example_test.go:894
Function
ExampleTitle
()
example_test.go:33
Function
ExampleVisibleWindow
This example shows the allocator options. They work with NewExecAllocator, when the program makes its own allocator.
example_test.go:1046
Function
ExampleWaitNewTarget
()
example_test.go:307
Function
ExampleWebSocket
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
Function
ExampleWithDialHTTPHeader
This example connects to a hosted browser service that needs an Authorization header on the websocket request.
remote/example_test.go:103
Function
ExampleWithKeepOpen
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
Function
ExampleWithVisibleWindow
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
Function
Example_documentDump
()
example_test.go:638
Function
Example_dump
()
example_test.go:589
Function
Example_retrieveHTML
()
example_test.go:378
Method
FullXPathByID
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
Function
FuzzReadFrame
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
Function
Headless
Headless is the command line option to run in headless mode. It sets the headless flag, hides scrollbars, and mutes audio.
allocate.go:825
Function
IgnoreCertErrors
IgnoreCertErrors is the command line option to ignore certificate errors. Use it to access an HTTPS website through a proxy.
allocate.go:791
Method
Int64
Int64 returns the Modifier as an int64 value.
kb/event.go:34
Function
JavascriptAttribute
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
Function
KeepOpen
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
Function
MouseEvent
MouseEvent is a mouse event action to dispatch the specified mouse event type at coordinates x, y.
input.go:35
Function
NoDefaultBrowserCheck
NoDefaultBrowserCheck is the Chrome command line option to disable the default browser check.
allocate.go:819
Function
NoFirstRun
NoFirstRun is the Chrome command line option to disable the first run dialog.
allocate.go:813
Function
NoInheritEnv
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
Function
NoModifyURL
NoModifyURL is an [Option] that prevents the allocator from modifying the websocket debugger URL passed to it.
remote/allocator.go:148
Function
NoSandbox
NoSandbox is the Chrome command line option to disable the sandbox.
allocate.go:807
Function
NodeEnabled
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
Function
NodeNotPresent
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
Function
NodeNotVisible
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
Function
NodeSelected
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
Function
NodeVisible
NodeVisible is an element query option that waits until the browser has sent all queried element nodes and they are visible.
query.go:634
Function
P
(e,r)
testdata/twgl-full.min.js:6
Method
PartialXPath
PartialXPath returns the partial XPath for the node. It stops at the nearest parent document node.
node.go:160
Method
PartialXPathByID
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
Function
PollFunction
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
Function
ProxyServer
ProxyServer is the command line option to set the outbound proxy server.
allocate.go:785
Function
R
(e,r)
testdata/twgl-full.min.js:6
Method
Read
(ctx context.Context, msg *cdproto.Message)
browser_test.go:116
Method
Read
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
Method
Read
(p []byte)
remote/internal/websocket/conn_test.go:25
Function
ResetViewport
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
Method
SetDebugf
SetDebugf sets the protocol logger. chromedp.NewBrowserTransport calls it with the logger of the browser.
remote/conn.go:83
Function
Sleep
Sleep is an action that waits for the duration, or until the context ends.
action.go:337
Method
String
String satisfies stringer interface.
node.go:352
Method
String
String returns the output that was kept.
allocate_pipe.go:181
Method
String
String satisfies stringer interface.
frame.go:52
Method
String
String satisfies fmt.Stringer.
device/device.go:53
Method
Subscribe
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
Method
Subscribe
Subscribe subscribes on the session, and ends the subscription when the context ends.
action.go:285
Function
T
(e,r,t,n)
testdata/twgl-full.min.js:6
← previous
next →
601–700 of 1,064, ranked by callers