Skip to content

Commit

Permalink
Merge pull request #116 from Xceptance/add-get-remote-webdriver-#115-…
Browse files Browse the repository at this point in the history
…issue

Add get remote webdriver #115 issue
  • Loading branch information
occupant23 authored Mar 31, 2020
2 parents 30a40ea + bc83bde commit 185efbd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/com/xceptance/neodymium/util/Neodymium.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import org.aeonbits.owner.ConfigFactory;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.events.EventFiringWebDriver;

import com.browserup.bup.BrowserUpProxy;
import com.codeborne.selenide.AssertionMode;
Expand Down Expand Up @@ -136,6 +138,16 @@ public static WebDriver getDriver()
return getContext().driver;
}

public static EventFiringWebDriver getEventFiringWebdriver()
{
return (EventFiringWebDriver) getDriver();
}

public static RemoteWebDriver getRemoteWebDriver()
{
return (RemoteWebDriver) getEventFiringWebdriver().getWrappedDriver();
}

public static void setDriver(WebDriver driver)
{
getContext().driver = driver;
Expand Down

0 comments on commit 185efbd

Please sign in to comment.