Skip to content

Commit

Permalink
#124: improved getters for proxy and webDriver
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Pfotenhauer committed Aug 26, 2020
1 parent 8216d75 commit 73f51f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/xceptance/neodymium/util/Neodymium.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ public static WebDriverStateContainer getWebDriverStateContainer()

public static WebDriver getDriver()
{
return getContext().webDriverStateContainer != null ? getContext().webDriverStateContainer.getWebDriver() : null;
final WebDriverStateContainer wDSC = getContext().webDriverStateContainer;
return wDSC == null ? null : wDSC.getWebDriver();
}

public static EventFiringWebDriver getEventFiringWebdriver()
Expand All @@ -158,7 +159,8 @@ public static RemoteWebDriver getRemoteWebDriver()

public static BrowserUpProxy getLocalProxy()
{
return getContext().webDriverStateContainer != null ? getContext().webDriverStateContainer.getProxy() : null;
final WebDriverStateContainer wDSC = getContext().webDriverStateContainer;
return wDSC == null ? null : wDSC.getProxy();
}

public static String getBrowserProfileName()
Expand Down

0 comments on commit 73f51f7

Please sign in to comment.