From 437276d3dc06a412a401e6e739e0af5d9caaf6c2 Mon Sep 17 00:00:00 2001 From: asoni3 Date: Mon, 26 Mar 2018 23:39:54 -0400 Subject: Automation Script to take screenshot for servo --- etc/start_servo.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 etc/start_servo.py (limited to 'etc/start_servo.py') diff --git a/etc/start_servo.py b/etc/start_servo.py new file mode 100644 index 00000000000..9954d3ab091 --- /dev/null +++ b/etc/start_servo.py @@ -0,0 +1,24 @@ +# Copyright 2018 The Servo Project Developers. See the COPYRIGHT +# file at the top-level directory of this distribution. +# +# Licensed under the Apache License, Version 2.0 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +""" +Created on Mon Mar 26 20:08:25 2018 +@author: Pranshu Sinha, Abhay Soni, Aayushi Agrawal +The script is intended to start servo on localhost:7002 +""" +import subprocess + + +def start_servo(port, resolution): + + # Use the below command if you are running this script on windows + # cmds = 'mach.bat run --webdriver ' + port + ' --resolution ' + resolution + cmds = './mach run --webdriver ' + port + ' --resolution ' + resolution + process = subprocess.Popen(cmds, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + return process -- cgit v1.2.3