Skip to content

Commit

Permalink
auto-nav.py: update to Python 3
Browse files Browse the repository at this point in the history
This change makes auto-nav.py use vpython3. This includes updating the
psutil wheel to the latest version (now available on Python 3 thanks
to the work on crbug.com/1141986), and replacing uses of raw_input()
with input().

Change-Id: I6a31742100839681b6b8e3251bb5236c76bab52e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2894450
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Jesse McKenna <jessemckenna@google.com>
Cr-Commit-Position: refs/heads/master@{#882717}
  • Loading branch information
jessemckenna authored and Chromium LUCI CQ committed May 13, 2021
1 parent 8cfbdc1 commit cb760ea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/auto-nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This script runs Chrome and automatically navigates through the given list of
URLs the specified number of times.
Usage: vpython auto-nav.py <chrome dir> <number of navigations> <url> <url> ...
Usage: vpython3 auto-nav.py <chrome dir> <number of navigations> <url> <url> ...
Optional flags:
* --interval <seconds>, -i <seconds>: specify a number of seconds to wait
Expand All @@ -26,7 +26,7 @@
"""

# [VPYTHON:BEGIN]
# python_version: "2.7"
# python_version: "3.8"
# wheel: <
# name: "infra/python/wheels/selenium-py2_py3"
# version: "version:3.14.0"
Expand All @@ -37,7 +37,7 @@
# >
# wheel: <
# name: "infra/python/wheels/psutil/${vpython_platform}"
# version: "version:5.6.2"
# version: "version:5.7.2"
# >
# [VPYTHON:END]

Expand Down Expand Up @@ -152,7 +152,7 @@ def main():

if args.start_prompt:
driver.get(args.url[0])
raw_input('Press Enter to begin navigation...')
input('Press Enter to begin navigation...')

# Start IdleWakeups, if using, passing the browser process's ID as its target.
# IdleWakeups will monitor the browser process and its children. Other running
Expand All @@ -179,7 +179,7 @@ def main():
time.sleep(interval)

if args.exit_prompt:
raw_input('Press Enter to exit...')
input('Press Enter to exit...')
driver.quit()

# Print IdleWakeups' output, if using.
Expand Down

0 comments on commit cb760ea

Please sign in to comment.