e89219a37faa3828eb9fbad7e1ffe578793ebc34 gperez2 Thu Oct 23 16:41:31 2025 -0700 Adding more arguments to the headless mode setup, No RM diff --git src/utils/qa/qaTestScript.py src/utils/qa/qaTestScript.py index ac47e08ad5b..7dafe6dccbb 100755 --- src/utils/qa/qaTestScript.py +++ src/utils/qa/qaTestScript.py @@ -70,30 +70,32 @@ os.makedirs("/hive/users/"+user+"/selenium/chrom113/cron/TMP", exist_ok=True) except OSError as e: print(f"Error creating directory: {e}") os.environ['TMPDIR'] = "/hive/users/"+user+"/selenium/chrom113/cron/TMP" def initialize_driver(headless): """Initiates which webdriver to run for headless mode or local mode""" options = Options() if headless: options.add_argument('--headless') options.add_argument('--no-sandbox') options.add_argument("--headless") options.add_argument('--disable-dev-shm-usage') options.add_argument("--start-maximized") options.add_argument("--window-size=1920,1080") + options.add_argument("--ignore-certificate-errors") + options.add_argument("--disable-gpu") options.binary_location = '/hive/users/lrnassar/selenium/chrom113/chromeInstall/opt/google/chrome/google-chrome' service = Service('/hive/users/lrnassar/selenium/chrom113/chromedriver') driver = webdriver.Chrome(service=service, options=options) else: # Asks user for the WebDriver location webdriver_location = input("Enter the WebDriver location: ") driver = webdriver.Chrome(service=Service(executable_path=webdriver_location)) return driver # Creates the command-line argument parser parser = argparse.ArgumentParser(description='Selenium script with headless/local mode.') parser.add_argument('--headless', action='store_true', help='Activate headless mode') parser.add_argument('--machine', type=str, help='Specify the machine URL') # Parses the command-line arguments