public class WebDriverFacade extends LogSupport
WebDriver
based Selenium testsConstructor and Description |
---|
WebDriverFacade(org.openqa.selenium.WebDriver driver,
io.fabric8.kubernetes.client.KubernetesClient client,
String namespace) |
Modifier and Type | Method and Description |
---|---|
void |
assertCurrentUrlStartsWith(String expectedUrl) |
org.openqa.selenium.WebElement |
clearAndSendKeys(org.openqa.selenium.By by,
String text)
Finds the element for the `by`, clears the field and sends the given text
|
boolean |
currentUrlStartsWith(String expectedUrl) |
org.openqa.selenium.WebElement |
findOptionalElement(org.openqa.selenium.By by)
Finds an element or returns null if it could not be found
|
org.openqa.selenium.WebElement |
findOptionalElement(org.openqa.selenium.WebElement element,
org.openqa.selenium.By by)
Find an optinoal element from a given element or return null
|
FormFacade |
form()
Returns a form facade for submitting a form
|
io.fabric8.kubernetes.client.KubernetesClient |
getClient() |
long |
getDefaultTimeoutInSeconds() |
WebDriverFacade |
getFacade() |
String |
getNamespace() |
String |
getServiceUrl(String serviceName)
Returns the service URL for the given service name
|
String |
navigateToService(String serviceName)
Navigates to the given service name in the current namespace
|
void |
setDefaultTimeoutInSeconds(long defaultTimeoutInSeconds) |
void |
sleep(long millis) |
boolean |
until(org.openqa.selenium.support.ui.ExpectedCondition<Boolean> condition) |
boolean |
until(String message,
org.openqa.selenium.support.ui.ExpectedCondition<Boolean> condition) |
boolean |
until(String message,
long timeoutInSeconds,
org.openqa.selenium.support.ui.ExpectedCondition<Boolean> condition) |
boolean |
untilElementPredicate(org.openqa.selenium.By by,
com.google.common.base.Function<org.openqa.selenium.WebElement,Boolean> elementPredicate) |
boolean |
untilElementPredicate(long timeoutInSeconds,
org.openqa.selenium.By by,
com.google.common.base.Function<org.openqa.selenium.WebElement,Boolean> elementPredicate) |
boolean |
untilIsDisplayed(org.openqa.selenium.By by) |
boolean |
untilIsDisplayed(org.openqa.selenium.By firstBy,
org.openqa.selenium.By secondBy) |
boolean |
untilIsDisplayed(long timeoutInSeconds,
org.openqa.selenium.By by) |
boolean |
untilIsDisplayed(long timeoutInSeconds,
org.openqa.selenium.By firstBy,
org.openqa.selenium.By secondBy) |
boolean |
untilIsEnabled(org.openqa.selenium.By by) |
boolean |
untilIsEnabled(long timeoutInSeconds,
org.openqa.selenium.By by) |
boolean |
untilLinkClicked(org.openqa.selenium.By by) |
boolean |
untilLinkClicked(long timeoutInSeconds,
org.openqa.selenium.By by) |
void |
untilLinkClickedLoop(org.openqa.selenium.By by,
String expectedUrl)
Lets wait until the link is visible then click it.
|
void |
untilOneOf(org.openqa.selenium.By... bys)
Waits until one of the given elements is available
|
boolean |
untilSelectedByVisibleText(org.openqa.selenium.By by,
String value) |
boolean |
untilSelectedByVisibleText(long timeoutInSeconds,
org.openqa.selenium.By by,
String value) |
public WebDriverFacade(org.openqa.selenium.WebDriver driver, io.fabric8.kubernetes.client.KubernetesClient client, String namespace)
public WebDriverFacade getFacade()
getFacade
in class LogSupport
public String getNamespace()
public io.fabric8.kubernetes.client.KubernetesClient getClient()
public String getServiceUrl(String serviceName)
public String navigateToService(String serviceName)
public org.openqa.selenium.WebElement findOptionalElement(org.openqa.selenium.By by)
public org.openqa.selenium.WebElement findOptionalElement(org.openqa.selenium.WebElement element, org.openqa.selenium.By by)
element
- by
- public org.openqa.selenium.WebElement clearAndSendKeys(org.openqa.selenium.By by, String text)
public FormFacade form()
public boolean until(org.openqa.selenium.support.ui.ExpectedCondition<Boolean> condition)
public boolean until(String message, org.openqa.selenium.support.ui.ExpectedCondition<Boolean> condition)
public boolean until(String message, long timeoutInSeconds, org.openqa.selenium.support.ui.ExpectedCondition<Boolean> condition)
public boolean untilLinkClicked(org.openqa.selenium.By by)
public boolean untilSelectedByVisibleText(org.openqa.selenium.By by, String value)
public boolean untilSelectedByVisibleText(long timeoutInSeconds, org.openqa.selenium.By by, String value)
public boolean untilIsDisplayed(org.openqa.selenium.By firstBy, org.openqa.selenium.By secondBy)
public boolean untilIsDisplayed(long timeoutInSeconds, org.openqa.selenium.By firstBy, org.openqa.selenium.By secondBy)
public boolean untilElementPredicate(org.openqa.selenium.By by, com.google.common.base.Function<org.openqa.selenium.WebElement,Boolean> elementPredicate)
public boolean untilElementPredicate(long timeoutInSeconds, org.openqa.selenium.By by, com.google.common.base.Function<org.openqa.selenium.WebElement,Boolean> elementPredicate)
public boolean untilIsDisplayed(org.openqa.selenium.By by)
public boolean untilIsDisplayed(long timeoutInSeconds, org.openqa.selenium.By by)
public boolean untilIsEnabled(org.openqa.selenium.By by)
public boolean untilIsEnabled(long timeoutInSeconds, org.openqa.selenium.By by)
public boolean untilLinkClicked(long timeoutInSeconds, org.openqa.selenium.By by)
public void untilOneOf(org.openqa.selenium.By... bys)
public void sleep(long millis)
public boolean currentUrlStartsWith(String expectedUrl)
public void assertCurrentUrlStartsWith(String expectedUrl)
public void untilLinkClickedLoop(org.openqa.selenium.By by, String expectedUrl)
public long getDefaultTimeoutInSeconds()
public void setDefaultTimeoutInSeconds(long defaultTimeoutInSeconds)
Copyright © 2011–2017 Red Hat. All rights reserved.