List of usage examples for org.openqa.selenium.remote RemoteWebElement getId
public String getId()
From source file:de.rub.nds.oidc.browser.BrowserSimulator.java
License:Apache License
protected final <T> T waitForPageLoad(Func<T> func) { RemoteWebElement oldHtml = (RemoteWebElement) driver.findElement(By.tagName("html")); T result = func.call();/*from w ww .jav a 2 s. co m*/ WebDriverWait wait = new WebDriverWait(driver, 30); wait.until((WebDriver input) -> { RemoteWebElement newHtml = (RemoteWebElement) driver.findElement(By.tagName("html")); return !newHtml.getId().equals(oldHtml.getId()); }); return result; }
From source file:io.appium.java_client.android.AndroidMobileCommandHelper.java
License:Apache License
/** * This method forms a {@link Map} of parameters for the element * value replacement. It is used against input elements * * @param remoteWebElement an instance which contains an element ID * @param value a new value//from w ww . jav a 2 s .c o m * @return a key-value pair. The key is the command name. The value is a {@link Map} command arguments. */ public static Map.Entry<String, Map<String, ?>> replaceElementValueCommand(RemoteWebElement remoteWebElement, String value) { String[] parameters = new String[] { "id", "value" }; Object[] values = new Object[] { remoteWebElement.getId(), value }; return new AbstractMap.SimpleEntry<>(REPLACE_VALUE, prepareArguments(parameters, values)); }