Fresh start for the StarlingX automation framework. Change-Id: Ie265e0791024f45f71faad6315c2b91b022934d1
25 lines
590 B
Python
25 lines
590 B
Python
import json5
|
|
|
|
|
|
class WebConfig:
|
|
"""
|
|
Class to hold configuration of the WebConfig
|
|
"""
|
|
|
|
def __init__(self, config):
|
|
|
|
try:
|
|
json_data = open(config)
|
|
except FileNotFoundError:
|
|
print(f"Could not find the Web config file: {config}")
|
|
raise
|
|
|
|
web_dict = json5.load(json_data)
|
|
self.run_headless = web_dict['run_headless']
|
|
|
|
def get_run_headless(self) -> bool:
|
|
"""
|
|
Getter for run_headless; Set this to false if you want to see UI tests run in a browser.
|
|
"""
|
|
return self.run_headless
|