use of org.openqa.selenium.remote.RemoteWebDriver in project flue2ent by DefinityLabs.
the class WebsiteTest method javaScript_returnsJavaScriptPlugin.
@Test
public void javaScript_returnsJavaScriptPlugin() {
RemoteWebDriver mockedWebDriver = mock(RemoteWebDriver.class);
Website website = Website.with(mockedWebDriver).visit(TEST_WEBSITE_URL);
JavaScriptPlugin javaScriptPlugin = website.javaScript();
assertThat(javaScriptPlugin).isNotNull();
}
use of org.openqa.selenium.remote.RemoteWebDriver in project flue2ent by DefinityLabs.
the class WebsiteTest method scroll_returnsScrollPlugin.
@Test
public void scroll_returnsScrollPlugin() {
RemoteWebDriver mockedWebDriver = mock(RemoteWebDriver.class);
Website website = Website.with(mockedWebDriver).visit(TEST_WEBSITE_URL);
ScrollPlugin scrollPlugin = website.scroll();
assertThat(scrollPlugin).isNotNull();
}
use of org.openqa.selenium.remote.RemoteWebDriver in project flue2ent by DefinityLabs.
the class WebsiteTest method screenshot_returnsScreenshotPlugin.
@Test
public void screenshot_returnsScreenshotPlugin() {
RemoteWebDriver mockedWebDriver = mock(RemoteWebDriver.class);
Website website = Website.with(mockedWebDriver).visit(TEST_WEBSITE_URL);
ScreenshotPlugin screenshotPlugin = website.screenshot();
assertThat(screenshotPlugin).isNotNull();
}
use of org.openqa.selenium.remote.RemoteWebDriver in project flue2ent by DefinityLabs.
the class WebsiteTest method page_returnsPagePlugin.
@Test
public void page_returnsPagePlugin() {
RemoteWebDriver mockedWebDriver = mock(RemoteWebDriver.class);
Website website = Website.with(mockedWebDriver).visit(TEST_WEBSITE_URL);
PagePlugin pagePlugin = website.page();
assertThat(pagePlugin).isNotNull();
}
use of org.openqa.selenium.remote.RemoteWebDriver in project flue2ent by DefinityLabs.
the class JavaScriptPluginTest method execute_callsExecuteScript.
@Test
public void execute_callsExecuteScript() {
RemoteWebDriver mockedDriver = mock(RemoteWebDriver.class);
Object response = new Object();
when(mockedDriver.executeScript(anyString(), anyString())).thenReturn(response);
JavaScriptPlugin javaScriptPlugin = new JavaScriptPlugin(mockedDriver);
String script = "js script";
Object result = javaScriptPlugin.execute(script, "paramOne");
verify(mockedDriver).executeScript(script, "paramOne");
assertThat(result).isSameAs(response);
}
Aggregations