List of usage examples for org.openqa.selenium WebElement clear
void clear();
From source file:org.alfresco.po.share.adminconsole.TagManagerPage.java
License:Open Source License
/** * Fill Search field/*from w ww.j a v a 2 s . c o m*/ * */ public void fillSearchField(String text) { checkNotNull(text); WebElement inputField = findAndWait(SEARCH_INPUT); inputField.clear(); inputField.sendKeys(text); }
From source file:org.alfresco.po.share.bulkimport.AdvancedBulkImportPage.java
License:Open Source License
/** * Method to set String input in the field * /*from w w w.j av a2 s .c om*/ * @param input WebElement * @param value String */ public void setInput(final WebElement input, final String value) { try { input.clear(); input.sendKeys(value); } catch (NoSuchElementException e) { throw new PageException("Unable to find the element"); } }
From source file:org.alfresco.po.share.ChangePasswordPage.java
License:Open Source License
private void fillField(By selector, String text) { checkNotNull(text);/*ww w. j a v a 2s .c o m*/ WebElement inputField = findAndWait(selector); inputField.clear(); if (text != null) { inputField.sendKeys(text); } }
From source file:org.alfresco.po.share.cmm.admin.CreateNewPropertyPopUp.java
License:Open Source License
/** * Sets the constraint min length field. * //from w w w. j a v a 2 s.co m * @param value the value * @return the CreateNewPropertyPopUp */ public void setConstraintMinLengthField(String value) { if (isElementDisplayed(CONSTRAINT_MIN_LENGTH_FIELD)) { try { WebElement field = findAndWait(CONSTRAINT_MIN_LENGTH_FIELD); field.clear(); field.sendKeys(value); } catch (TimeoutException toe) { throw new PageOperationException("Not visible Element: CONSTRAINT_MIN_LENGTH_FIELD", toe); } } }
From source file:org.alfresco.po.share.cmm.admin.CreateNewPropertyPopUp.java
License:Open Source License
/** * Sets the constraint max length field. * /*from w w w.j av a 2 s. c om*/ * @param value the value * @return the CreateNewPropertyPopUp */ public void setConstraintMaxLengthField(String value) { if (isElementDisplayed(CONSTRAINT_MAX_LENGTH_FIELD)) { try { WebElement field = findAndWait(CONSTRAINT_MAX_LENGTH_FIELD); field.clear(); field.sendKeys(value); } catch (TimeoutException toe) { throw new PageOperationException("Not visible Element: CONSTRAINT_MAX_LENGTH_FIELD", toe); } } }
From source file:org.alfresco.po.share.cmm.admin.CreateNewPropertyPopUp.java
License:Open Source License
/** * Sets the constraint min value field.// w w w . jav a 2 s. c om * * @param value the value * @return the CreateNewPropertyPopUp */ public void setConstraintMinValueField(String value) { if (isElementDisplayed(CONSTRAINT_MIN_VALUE_FIELD)) { try { WebElement field = findAndWait(CONSTRAINT_MIN_VALUE_FIELD); field.clear(); field.sendKeys(value); } catch (TimeoutException toe) { throw new PageOperationException("Not visible Element: CONSTRAINT_MIN_VALUE_FIELD", toe); } } }
From source file:org.alfresco.po.share.cmm.admin.CreateNewPropertyPopUp.java
License:Open Source License
/** * Sets the constraint max value field.//ww w. ja va2 s.c om * * @param value the value * @return the CreateNewPropertyPopUp */ public void setConstraintMaxValueField(String value) { if (isElementDisplayed(CONSTRAINT_MAX_VALUE_FIELD)) { try { WebElement field = findAndWait(CONSTRAINT_MAX_VALUE_FIELD); field.clear(); field.sendKeys(value); } catch (TimeoutException toe) { throw new PageOperationException("Not visible Element: CONSTRAINT_MAX_VALUE_FIELD", toe); } } }
From source file:org.alfresco.po.share.cmm.admin.EditCustomTypePopUp.java
License:Open Source License
/** * Sets the title field./*ww w. j a v a 2 s .co m*/ * * @param title the title * @return the EditCustomTypePopUp */ public EditCustomTypePopUp setTitleField(String title) { PageUtils.checkMandatoryParam("title", title); try { WebElement titleField = findAndWait(TITLE_FIELD); titleField.clear(); titleField.sendKeys(title); return this; } catch (TimeoutException toe) { throw new PageOperationException("Not visible Element: TITLE_FIELD ", toe); } }
From source file:org.alfresco.po.share.cmm.admin.EditCustomTypePopUp.java
License:Open Source License
/** * Sets the description field./*from w ww .j a va2 s. c o m*/ * * @param description the description * @return the EditCustomTypePopUp */ public EditCustomTypePopUp setDescriptionField(String description) { PageUtils.checkMandatoryParam("description", description); try { WebElement descField = findAndWait(DESCRIPTION_FIELD); descField.clear(); descField.sendKeys(description); return this; } catch (TimeoutException toe) { throw new PageOperationException("Not visible Element: DESCRIPTION_FIELD ", toe); } }
From source file:org.alfresco.po.share.cmm.admin.EditPropertyGroupPopUp.java
License:Open Source License
/** * Sets the title field./* w ww . j ava 2 s . c o m*/ * * @param title the title * @return the EditPropertyGroupPopUp */ public EditPropertyGroupPopUp setTitleField(String title) { PageUtils.checkMandatoryParam("title", title); try { WebElement titleField = findAndWait(TITLE_FIELD); titleField.clear(); titleField.sendKeys(title); return this; } catch (TimeoutException toe) { throw new PageOperationException("Not visible Element: TITLE_FIELD", toe); } }