Skip to content

Commit

Permalink
Merge pull request red-hat-storage#8203 from DanielOsypenko/selenium-…
Browse files Browse the repository at this point in the history
…driver-constructor-fix
  • Loading branch information
petr-balogh authored Aug 8, 2023
2 parents 6aeab17 + ce9e1e6 commit 4339b0e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ocs_ci/ocs/ui/base_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,14 @@ class SeleniumDriver(WebDriver):

# noinspection PyUnresolvedReferences
def __new__(cls):
if not hasattr(cls, "instance"):
if not hasattr(cls, "instance") or not hasattr(cls.instance, "driver"):
logger.debug("Creating instance of Selenium Driver")
cls.instance = super(SeleniumDriver, cls).__new__(cls)
cls.instance.driver = cls._set_driver()
else:
logger.debug(
"SeleniumDriver instance already exists, driver created earlier"
)
return cls.instance.driver

@classmethod
Expand Down

0 comments on commit 4339b0e

Please sign in to comment.