Skip to content

Commit

Permalink
Merge pull request #54 from F-Secure/sut_start_timeout
Browse files Browse the repository at this point in the history
feat: add timeout for start of SUT
  • Loading branch information
oikajo authored Jan 4, 2022
2 parents 2c7106f + d681549 commit 8261f62
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion change_analyzer/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import uuid
from configparser import ConfigParser
from configparser import ConfigParser, NoOptionError
from datetime import datetime
import argparse

Expand All @@ -26,6 +26,12 @@ def reset() -> WebDriver:
"deviceName": "WindowsPC",
}
driver = webdriver.Remote(CONFIG["driver"]["command_executor"], capabilities)
try:
timeout = CONFIG.get("driver", "timeout")
except NoOptionError:
timeout = 0
print(f"Current timeout:{timeout} seconds")
driver.implicitly_wait(timeout)

if CONFIG["driver"]["platform"] == "web":
web_options = webdriver.ChromeOptions()
Expand Down

0 comments on commit 8261f62

Please sign in to comment.