Tabnine Logo
WebElement.findElement
Code IndexAdd Tabnine to your IDE (free)

How to use
findElement
method
in
org.openqa.selenium.WebElement

Best Java code snippets using org.openqa.selenium.WebElement.findElement (Showing top 20 results out of 900)

origin: spring-io/initializr

public void autocomplete(String text) {
  this.form.findElement(By.id("autocomplete")).sendKeys(text);
}
origin: TEAMMATES/teammates

public void editFeedbackResponseCommentInOpenedCommentModal(String commentIdSuffix, String newCommentText) {
  WebElement commentRow = browser.driver.findElement(By.id("responseCommentRow" + commentIdSuffix));
  click(commentRow.findElements(By.tagName("a")).get(1));
  WebElement commentEditForm = browser.driver.findElement(By.id("responseCommentEditForm" + commentIdSuffix));
  fillRichTextEditor("responsecommenttext" + commentIdSuffix, newCommentText);
  click(commentEditForm.findElement(By.className("col-sm-offset-5")).findElement(By.tagName("a")));
  ThreadHelper.waitFor(1000);
}
origin: spring-io/initializr

public void packaging(String text) {
  this.form.findElement(By.id("packaging")).sendKeys(text);
}
origin: TEAMMATES/teammates

public void editFeedbackResponseComment(String commentIdSuffix, String newCommentText) {
  WebElement commentRow = waitForElementPresence(By.id("responseCommentRow" + commentIdSuffix));
  click(commentRow.findElements(By.tagName("a")).get(1));
  WebElement commentEditForm = browser.driver.findElement(By.id("responseCommentEditForm" + commentIdSuffix));
  fillRichTextEditor("responsecommenttext" + commentIdSuffix, newCommentText);
  click(commentEditForm.findElement(By.className("col-sm-offset-5")).findElement(By.tagName("a")));
  ThreadHelper.waitFor(1000);
}
origin: spring-io/initializr

public void language(String text) {
  this.form.findElement(By.id("language")).sendKeys(text);
}
origin: spring-io/initializr

public void type(String text) {
  this.form.findElement(By.id("type")).sendKeys(text);
}
origin: spring-io/initializr

public void bootVersion(String text) {
  this.form.findElement(By.id("bootVersion")).sendKeys(text);
  this.form.click();
}
origin: spring-io/initializr

public void description(String text) {
  this.form.findElement(By.id("description")).clear();
  this.form.findElement(By.id("description")).sendKeys(text);
}
origin: spring-io/initializr

public void groupId(String text) {
  this.form.findElement(By.id("groupId")).clear();
  this.form.findElement(By.id("groupId")).sendKeys(text);
}
origin: spring-io/initializr

public void packageName(String text) {
  this.form.findElement(By.id("packageName")).clear();
  this.form.findElement(By.id("packageName")).sendKeys(text);
}
origin: spring-io/initializr

public void artifactId(String text) {
  this.form.findElement(By.id("artifactId")).clear();
  this.form.findElement(By.id("artifactId")).sendKeys(text);
}
origin: spring-io/initializr

public void name(String text) {
  this.form.findElement(By.id("name")).clear();
  this.form.findElement(By.id("name")).sendKeys(text);
}
origin: spring-io/initializr

public void advanced() {
  this.form.findElement(By.cssSelector(".tofullversion"))
      .findElement(By.tagName("a")).click();
}
origin: spring-io/initializr

public Object value(String id) {
  return getInputValue(this.form.findElement(By.id(id)));
}
origin: spring-io/initializr

public void simple() {
  this.form.findElement(By.cssSelector(".tosimpleversion")).click();
}
origin: spring-io/initializr

public HomePage submit() {
  String url = this.driver.getCurrentUrl();
  this.form.findElement(By.name("generate-project")).click();
  assertThat(this.driver.getCurrentUrl()).isEqualTo(url);
  return this;
}
origin: TEAMMATES/teammates

public void clickRemoveRankOptionLink(int qnIndex, int optionIndex) {
  String idSuffix = getIdSuffix(qnIndex);
  WebElement msqOptionRow = browser.driver.findElement(By.id("rankOptionRow-" + optionIndex + idSuffix));
  WebElement removeOptionLink = msqOptionRow.findElement(By.id("rankRemoveOptionLink"));
  click(removeOptionLink);
}
origin: TEAMMATES/teammates

public void enableOtherFeedbackPathOptions(int qnNumber) {
  WebElement questionTable = browser.driver.findElement(By.id("questionTable-" + qnNumber));
  WebElement dropdownButton = questionTable.findElement(By.cssSelector(".feedback-path-dropdown > button"));
  WebElement otherOption = questionTable.findElement(
                 By.className("feedback-path-dropdown-option-other"));
  click(dropdownButton);
  click(otherOption);
}
origin: TEAMMATES/teammates

private WebElement getSessionLinkInRow(String elementClassNamePrefix, int rowId) {
  waitForElementPresence(By.id("session" + rowId));
  waitForElementPresence(By.className(elementClassNamePrefix));
  return browser.driver.findElement(By.id("session" + rowId)).findElement(By.className(elementClassNamePrefix));
}
origin: TEAMMATES/teammates

private WebElement getCourseLinkInRow(String elementClassNamePrefix, int rowId) {
  waitForElementPresence(By.id("course-" + rowId));
  waitForElementPresence(By.className(elementClassNamePrefix));
  return browser.driver.findElement(By.id("course-" + rowId)).findElement(By.className(elementClassNamePrefix));
}
org.openqa.seleniumWebElementfindElement

Javadoc

Find the first WebElement using the given method. See the note in #findElements(By) about finding via XPath. This method is affected by the 'implicit wait' times in force at the time of execution. The findElement(..) invocation will return a matching row, or try again repeatedly until the configured timeout is reached. findElement should not be used to look for non-present elements, use #findElements(By)and assert zero length response instead.

Popular methods of WebElement

  • getText
    Get the visible (i.e. not hidden by CSS) text of this element, including sub-elements.
  • click
    Click this element. If this causes a new page to load, you should discard all references to this ele
  • sendKeys
    Use this method to simulate typing into an element, which may set its value.
  • getAttribute
    Get the value of the given attribute of the element. Will return the current value, even if this has
  • clear
    If this element is a text entry element, this will clear the value. Has no effect on other elements.
  • isDisplayed
    Is this element displayed or not? This method avoids the problem of having to parse an element's "st
  • findElements
    Find all elements within the current context using the given mechanism. When using xpath be aware th
  • isSelected
    Determine whether or not this element is selected or not. This operation only applies to input eleme
  • getTagName
    Get the tag name of this element. Not the value of the name attribute: will return"input" for the el
  • isEnabled
    Is the element currently enabled or not? This will generally return true for everything but disabled
  • getLocation
    Where on the page is the top left-hand corner of the rendered element?
  • submit
    If this current element is a form, or an element within a form, then this will be submitted to the r
  • getLocation,
  • submit,
  • getSize,
  • getCssValue,
  • getRect,
  • getScreenshotAs,
  • getValue,
  • setSelected,
  • toggle

Popular in Java

  • Updating database using SQL prepared statement
  • setContentView (Activity)
  • requestLocationUpdates (LocationManager)
  • getSystemService (Context)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • String (java.lang)
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Option (scala)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now