net.serenitybdd.core.pages.WebElementFacade Maven / Gradle / Ivy
package net.serenitybdd.core.pages;
import io.appium.java_client.FindsByAccessibilityId;
import io.appium.java_client.FindsByAndroidUIAutomator;
import io.appium.java_client.FindsByIosUIAutomation;
import net.serenitybdd.core.annotations.ImplementedBy;
import net.thucydides.core.webdriver.ConfigurableTimeouts;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.internal.Locatable;
import org.openqa.selenium.internal.WrapsElement;
import org.openqa.selenium.support.ui.Wait;
import java.util.List;
import java.util.concurrent.TimeUnit;
@ImplementedBy(WebElementFacadeImpl.class)
public interface WebElementFacade extends WebElement, WrapsElement, Locatable, WebElementState, FindsByAccessibilityId, FindsByAndroidUIAutomator,
FindsByIosUIAutomation, ConfigurableTimeouts {
public T then(String xpathOrCssSelector);
public T findBy(String xpathOrCssSelector);
public List thenFindAll(
String xpathOrCssSelector);
public T findBy(By selector);
public T find(By bySelector);
public T then(By bySelector);
public String getAttribute(String name);
public List thenFindAll(By selector);
public long getImplicitTimeoutInMilliseconds();
public T withTimeoutOf(int timeout, TimeUnit unit);
/**
* Convenience method to chain method calls more fluently.
*/
public T and();
/**
* Convenience method to chain method calls more fluently.
*/
public T then();
public List getSelectOptions();
/**
* Type a value into a field, making sure that the field is empty first.
*
* @param value
*/
public T type(String value);
/**
* Type a value into a field and then press Enter, making sure that the field is empty first.
*
* @param value
*/
public T typeAndEnter(String value);
/**
* Type a value into a field and then press TAB, making sure that the field is empty first.
* This currently is not supported by all browsers, notably Firefox.
*
* @param value
*/
public T typeAndTab(String value);
public void setWindowFocus();
public T deselectAll();
public T deselectByVisibleText(String label);
public T deselectByValue(String value);
public T deselectByIndex(int indexValue);
public T selectByVisibleText(String label);
public T selectByValue(String value);
public T selectByIndex(int indexValue);
public T waitUntilVisible();
public T waitUntilPresent();
public Wait waitForCondition();
public T waitUntilNotVisible();
public String getValue();
public String getText();
public T waitUntilEnabled();
public T waitUntilClickable();
public T waitUntilDisabled();
/**
* Wait for an element to be visible and enabled, and then click on it.
*/
public void click();
public void clear();
public String toString();
public boolean containsElements(By selector);
public boolean containsElements(String xpathOrCssSelector);
public void shouldContainElements(By selector);
public void shouldContainElements(String xpathOrCssSelector);
public boolean hasClass(String cssClassName);
}