2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
7 import pyauto_functional
# has to be imported before pyauto
11 VM_CHROMEDRIVER_PORT
= 4444
13 if __name__
== '__main__':
14 """Script to prepare machine state for use as a WebDriver-controlled VM.
16 This script is intended to be run manually over ssh on a Chromium OS virtual
17 machine qcow2 image. Manually create a snapshot of the VM when prompted. The
18 resulting VM image will have ChromeDriver listening on port 4444.
20 pyauto_suite
= pyauto
.PyUITestSuite(sys
.argv
)
21 pyuitest
= pyauto
.PyUITest()
23 driver
= pyuitest
.NewWebDriver(port
=VM_CHROMEDRIVER_PORT
)
24 logging
.info('WebDriver is listening on port %d.'
25 % VM_CHROMEDRIVER_PORT
)
26 logging
.info('Machine prepared for VM snapshot.')
27 raw_input('Please snapshot the VM and hit ENTER when done to '
28 'terminate this script.')