use of org.openqa.selenium.remote.RemoteWebDriver in project flue2ent by DefinityLabs.
the class ScrollPluginTest method down_executesJavascript.
@Test
public void down_executesJavascript() {
RemoteWebDriver mockedDriver = mock(RemoteWebDriver.class);
ScrollPlugin scrollPlugin = new ScrollPlugin(mockedDriver);
ScrollPlugin result = scrollPlugin.down();
verify(mockedDriver).executeScript("window.scrollBy(0, 250);");
assertThat(result).isSameAs(scrollPlugin);
}
use of org.openqa.selenium.remote.RemoteWebDriver in project flue2ent by DefinityLabs.
the class ScrollPluginTest method top_executesJavascript.
@Test
public void top_executesJavascript() {
RemoteWebDriver mockedDriver = mock(RemoteWebDriver.class);
ScrollPlugin scrollPlugin = new ScrollPlugin(mockedDriver);
ScrollPlugin result = scrollPlugin.top();
verify(mockedDriver).executeScript("window.scrollTo(0, 0);");
assertThat(result).isSameAs(scrollPlugin);
}
use of org.openqa.selenium.remote.RemoteWebDriver in project flue2ent by DefinityLabs.
the class ScrollPluginTest method by_executesJavascript.
@Test
public void by_executesJavascript() {
RemoteWebDriver mockedDriver = mock(RemoteWebDriver.class);
ScrollPlugin scrollPlugin = new ScrollPlugin(mockedDriver);
ScrollPlugin result = scrollPlugin.by(10, 20);
verify(mockedDriver).executeScript("window.scrollBy(10, 20);");
assertThat(result).isSameAs(scrollPlugin);
}
use of org.openqa.selenium.remote.RemoteWebDriver in project vorto by eclipse.
the class BasicRepositoryUITest method testCopyrightFooter.
/**
* Tests if the copyright footer is there.
*/
@Test
public void testCopyrightFooter() {
RemoteWebDriver webDriver = this.seleniumVortoHelper.getRemoteWebDriver();
this.seleniumVortoHelper.allowCookies();
WebElement copyrightFooter = webDriver.findElementByXPath("//li[@class='copyright']");
Assert.assertTrue(copyrightFooter.isDisplayed());
String copyrightText = copyrightFooter.getText();
Assert.assertTrue("Text was: " + copyrightText, copyrightText.contains("Revision:"));
}
use of org.openqa.selenium.remote.RemoteWebDriver in project vorto by eclipse.
the class BasicRepositoryUITest method testLoginButton.
/**
* Test if the login button is there and can be clicked.
*/
@Test
public void testLoginButton() {
final RemoteWebDriver webDriver = this.seleniumVortoHelper.getRemoteWebDriver();
webDriver.get(rootUrl);
webDriver.findElementByLinkText("Login").click();
webDriver.findElementsByXPath("//a[@href='github/login']");
webDriver.findElementsByXPath("//a[@href='eidp/login']");
}
Aggregations