Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Control Servo using WebDriver

Bastien Orivel edited this pageSep 9, 2018 ·2 revisions

First, run an instance of Servo with the webdriver server enabled on a particular port (and optionally a particular resolution):

$ ./mach run --webdriver=7002 --resolution=400x300

From another terminal window, use curl or wget to interact with the webdriver web server inside of Servo (requires that thejq utility is installed):

# Create a session for subsequent commands$ SESSIONID=$(curl -X POST -d "{}" http://localhost:7002/session | jq -r ".value.sessionId")# Load the desired URL$ curl -v -X POST -d '{"url": "http://example.org"}' http://localhost:7002/session/${SESSIONID}/url# Save a screenshot of the current content to a file$ curl -v http://localhost:7002/session/${SESSIONID}/screenshot | jq -r ".value" | base64 -d > test1.png

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp