Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get remote webdriver #115 issue #116

Merged
merged 2 commits into from
Mar 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.codeborne.selenide.AssertionMode;
import com.codeborne.selenide.Configuration;
Expand Down Expand Up @@ -132,6 +134,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