List of usage examples for org.openqa.selenium WebElement clear
void clear();
From source file:org.apache.falcon.regression.ui.search.ClusterWizardPage.java
License:Apache License
public void setDescription(String description) { WebElement descriptionInput = clusterBox.findElement(By.xpath("//div[label[text()='Description']]/input")); descriptionInput.clear(); sendKeysSlowly(descriptionInput, description); }
From source file:org.apache.falcon.regression.ui.search.ClusterWizardPage.java
License:Apache License
public void setOwner(String owner) { WebElement ownerInput = clusterBox.findElement(By.xpath("//div[label[text()='Owner']]/input")); ownerInput.clear(); sendKeysSlowly(ownerInput, owner);// w w w .ja va2 s. com }
From source file:org.apache.falcon.regression.ui.search.ClusterWizardPage.java
License:Apache License
public void setGroup(String group) { WebElement groupInput = clusterBox.findElement(By.xpath("//div[label[text()='Group']]/input")); groupInput.clear(); sendKeysSlowly(groupInput, group);/*from ww w . ja va 2s . c om*/ }
From source file:org.apache.falcon.regression.ui.search.ClusterWizardPage.java
License:Apache License
public void setPermissions(String permissions) { WebElement permissionsInput = clusterBox.findElement(By.xpath("//div[label[text()='Permissions']]/input")); permissionsInput.clear(); sendKeysSlowly(permissionsInput, permissions); }
From source file:org.apache.falcon.regression.ui.search.ClusterWizardPage.java
License:Apache License
/** * Common method to fill interfaces./*from w ww . jav a2 s.c o m*/ */ public void setInterface(Interface iface) { String xpath = "//input[contains(@ng-model," + " 'clusterEntity.clusterModel.cluster.interfaces.interface[%sPos]._endpoint')]"; WebElement ifaceEndpoint = clusterBox.findElement(By.xpath(String.format(xpath, iface.getType().value()))); ifaceEndpoint.clear(); sendKeysSlowly(ifaceEndpoint, iface.getEndpoint()); setInterfaceVersion(iface); }
From source file:org.apache.falcon.regression.ui.search.ClusterWizardPage.java
License:Apache License
/** * Set interface version by interface type. *///w ww . j a v a 2 s . com public void setInterfaceVersion(Interface iface) { WebElement ifaceVersion = getInterfaceVersionInput(iface.getType()); if (iface.getVersion() != null) { ifaceVersion.clear(); sendKeysSlowly(ifaceVersion, iface.getVersion()); } }
From source file:org.apache.falcon.regression.ui.search.ClusterWizardPage.java
License:Apache License
/** * Method to set locations. Location can be only one of ClusterLocationType. So adding new location only after * respective compulsory location was filled. * @param locations locations/*from w w w .j a va2 s .c o m*/ */ public void setLocations(List<Location> locations) { boolean staging = false, temp = false, working = false; for (Location location : locations) { WebElement pathInput = null; if (location.getName() == ClusterLocationType.STAGING && !staging) { pathInput = clusterBox.findElement(By.id("location.staging")); staging = true; } else if (location.getName() == ClusterLocationType.TEMP && !temp) { pathInput = clusterBox.findElement(By.id("location.temp")); temp = true; } else if (location.getName() == ClusterLocationType.WORKING && !working) { pathInput = clusterBox.findElement(By.id("location.working")); working = true; } else { fillAdditionalLocation(location); } if (pathInput != null) { pathInput.clear(); sendKeysSlowly(pathInput, location.getPath()); } } }
From source file:org.apache.falcon.regression.ui.search.ProcessWizardPage.java
License:Apache License
public void setName(String name) { final WebElement nameElement = getName(); nameElement.clear(); for (String s : name.split("")) { nameElement.sendKeys(s);/*from w w w.j a v a2 s . c o m*/ } }
From source file:org.apache.falcon.regression.ui.search.ProcessWizardPage.java
License:Apache License
public void deleteTags() { //delete all tags final List<WebElement> deleteTagButtons = getDeleteTagButtons(); for (WebElement deleteTagButton : Lists.reverse(deleteTagButtons)) { deleteTagButton.click();/* www . j a va 2 s . c o m*/ } for (WebElement textField : getTagTextFields()) { textField.clear(); } }
From source file:org.apache.falcon.regression.ui.search.ProcessWizardPage.java
License:Apache License
public void setWorkflow(Workflow processWf) { final WebElement wfName = getWfName(); wfName.clear(); wfName.sendKeys(processWf.getName()); switch (processWf.getEngine()) { case OOZIE://from w w w . java2s .co m getOozieRadio().click(); break; case PIG: getPigRadio().click(); break; case HIVE: getHiveRadio().click(); break; default: Assert.fail("Unexpected workflow engine: " + processWf.getEngine()); } final String version = processWf.getVersion(); // The getVersion() method returns '1.0' if its null, hence the hack below if (StringUtils.isNotEmpty(version) && !version.equals("1.0")) { getEngineVersion().selectByVisibleText(version); } final WebElement path = getPath(); path.clear(); path.sendKeys(processWf.getPath()); }