diff --git a/selenium/lambdatest_selenium_driver/smartui.py b/selenium/lambdatest_selenium_driver/smartui.py index 9dea596..64e568a 100644 --- a/selenium/lambdatest_selenium_driver/smartui.py +++ b/selenium/lambdatest_selenium_driver/smartui.py @@ -12,7 +12,7 @@ def smartui_snapshot(driver, name,options={}): if not name: raise Exception('The `snapshotName` argument is required.') if is_smartui_enabled() is False: - raise Exception("SmartUI server is not running.") + raise Exception("Cannot find SmartUI server.") resp = fetch_dom_serializer() driver.execute_script(resp['data']['dom']) diff --git a/utils/lambdatest_sdk_utils/constants.py b/utils/lambdatest_sdk_utils/constants.py index 5497436..e5e2dbc 100644 --- a/utils/lambdatest_sdk_utils/constants.py +++ b/utils/lambdatest_sdk_utils/constants.py @@ -1,7 +1,9 @@ import os def get_smart_ui_server_address(): - return os.getenv('SMARTUI_SERVER_ADDRESS', 'http://localhost:8080') + if not os.getenv('SMARTUI_SERVER_ADDRESS'): + raise Exception('SmartUI server address not found') + return os.getenv('SMARTUI_SERVER_ADDRESS') def get_pkg_name(): return "@lambdatest/python-selenium-driver" \ No newline at end of file