Tabnine Logo
SelenideElement.click
Code IndexAdd Tabnine to your IDE (free)

How to use
click
method
in
com.codeborne.selenide.SelenideElement

Best Java code snippets using com.codeborne.selenide.SelenideElement.click (Showing top 20 results out of 315)

origin: Evolveum/midpoint

  public EditTaskPage clickResume() {

    $(Schrodinger.byDataResourceKey("a", "pageTaskEdit.button.resume")).waitUntil(Condition.visible, MidPoint.TIMEOUT_DEFAULT_2_S).click();

    return this;
  }
}
origin: Evolveum/midpoint

  public void clickOnWizardTab(String tabName){
    $(By.linkText(tabName))
        .shouldBe(Condition.visible)
        .click();
  }
}
origin: alfa-laboratory/akita

/**
 * На странице происходит клик по заданному элементу
 */
@И("^выполнено нажатие на (?:кнопку|поле|блок) \"([^\"]*)\"$")
public void clickOnElement(String elementName) {
  akitaScenario.getCurrentPage().getElement(elementName).click();
}
origin: Evolveum/midpoint

public ListTasksPage clickSave() {
  $(Schrodinger.byDataId("saveButton"))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S).click();
  return new ListTasksPage();
}
origin: Evolveum/midpoint

public T clickShowExisting() {
  $(Schrodinger.byDataResourceKey("schrodinger", "ResourceContentResourcePanel.showExisting")).parent()
      .click();
  return this.getParent();
}
origin: alfa-laboratory/akita

/**
 * На странице происходит клик по заданному элементу в блоке
 */
@И("^выполнено нажатие на (?:кнопку|поле) \"([^\"]*)\" в блоке \"([^\"]*)\"$")
public void clickOnElementInBlock(String elementName, String blockName) {
  akitaScenario.getCurrentPage().getBlock(blockName).getElement(elementName).click();
}
/**
origin: org.apache.jspwiki.it/jspwiki-selenide-tests

public ReadWikiPage performLogin( String login, String password ) {
  Selenide.$( By.id( "j_username" ) ).val( login );
  Selenide.$( By.id( "j_password" ) ).val( password );
  Selenide.$( By.name( "submitlogin" ) ).click();
  
  return new ReadWikiPage();
}
origin: Evolveum/midpoint

  public LoginPage logout() {
    SelenideElement userMenu =  $(".dropdown.user.user-menu");

    userMenu.$(By.cssSelector(".dropdown-toggle")).click();
    userMenu.$(By.cssSelector(".user-footer"))
        .$(Schrodinger.byElementAttributeValue("input", "type", "submit")).click();

    //todo implement

    return new LoginPage();
  }
}
origin: Evolveum/midpoint

public T clickDone() {
  $(Schrodinger.byDataResourceKey("div", "AssignmentPanel.doneButton"))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S).click();
  return this.getParent();
}
origin: Evolveum/midpoint

public T clickAdd() {
  $(Schrodinger.byDataResourceKey("userBrowserDialog.button.addButton"))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S).click();
  return this.getParent();
}
origin: selenide-examples/hangman

@Test
public void userHasNoMoreThan6Tries() {
 letter("B").click();
 letter("D").click();
 letter("E").click();
 letter("G").click();
 letter("H").click();
 letter("I").click();
 letter("J").click();
 letter("B").shouldHave(cssClass("nonused"));
 $("#gameLost").shouldBe(visible);
}
origin: Evolveum/midpoint

public ResourceShadowTableCog<ResourceShadowTable<T>> clickCog() {
  $(Schrodinger.byElementAttributeValue("button", "data-toggle", "dropdown"))
      .waitUntil(Condition.visible, MidPoint.TIMEOUT_DEFAULT_2_S).click();
  SelenideElement cog = $(Schrodinger.byElementAttributeValue("ul","role","menu"))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S);
  return new ResourceShadowTableCog<>(this, cog);
}
origin: Evolveum/midpoint

public ResourceTaskQuickAccessDropDown<ResourceAccountsTab<T>> importTask() {
  $(Schrodinger.byElementAttributeValue("label", "data-s-id", "label", "Import"))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S).click();
  SelenideElement dropDownElement = $(Schrodinger.byElementAttributeValue("ul", "role", "menu"))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S);
  return new ResourceTaskQuickAccessDropDown<>(this, dropDownElement);
}
origin: Evolveum/midpoint

public ConfirmationModal<UsersTableDropDown<T>> clickUnlock() {
  $(Schrodinger.byElementValue("a", "data-s-id", "menuItemLink", "\n" +
      "        Unlock")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S).click();
  SelenideElement actualModal = $(Schrodinger.byElementAttributeValue("div", "aria-labelledby", "Confirm action"))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S);
  return new ConfirmationModal<>(this, actualModal);
}
origin: Evolveum/midpoint

public TaskBasicTab clickShowTask() {
  $(Schrodinger.byDataId("backgroundTask")).click();
  SelenideElement taskBasicTab = $(Schrodinger.byDataResourceKey("pageTaskEdit.basic"));
  return new TaskBasicTab(new EditTaskPage(), taskBasicTab);
}
origin: Evolveum/midpoint

public T clickYes() {
  $(Schrodinger.byDataResourceKey("a", "confirmationDialog.yes"))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S).click();
  $(Schrodinger.byDataResourceKey("a", "confirmationDialog.yes"))
      .waitUntil(Condition.disappears, MidPoint.TIMEOUT_LONG_1_M);
  return this.getParent();
}
origin: Evolveum/midpoint

public ResourceTaskQuickAccessDropDown<ResourceAccountsTab<T>> reconciliationTask() {
  $(Schrodinger.byElementAttributeValue("label", "data-s-id", "label", "Reconciliation"))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S).click();
  SelenideElement dropDownElement = $(Schrodinger.byElementAttributeValue("ul", "role", "menu"))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S);
  return new ResourceTaskQuickAccessDropDown<>(this, dropDownElement);
}
origin: Evolveum/midpoint

  private SelenideElement verifyAndFetchActiveTab(SelenideElement link) {
    link.shouldBe(Condition.visible);

    link.click();

    SelenideElement li = link.parent();
    li.shouldHave(Condition.cssClass("active"));

    return li.parent().parent().$(By.cssSelector(".tab-pane.active"));
  }
}
origin: Evolveum/midpoint

public ConfirmationModal<T> clickDelete() {
  $(Schrodinger.byDataResourceKey("pageContentAccounts.menu.deleteAccount"))
      .waitUntil(Condition.exist, MidPoint.TIMEOUT_DEFAULT_2_S).parent().click();
  SelenideElement modalBox = $(Schrodinger.byElementAttributeValue("div", "aria-labelledby", "Confirm deletion"))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S);
  return new ConfirmationModal<>(this.getParent(), modalBox);
}
origin: Evolveum/midpoint

  public InputBox<Search<T>> byFullText() {

    SelenideElement linksContainer = getParentElement().$(Schrodinger.byDataId("div", "linksContainer")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S);
    try {
      linksContainer.$(Schrodinger.byDataId("a", "fullText")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S).click();
    } catch (Throwable t) {
      // all is ok, fullText search is already selected option, TODO: Schrodinger should provide easy method to check component existence
    }

    // we assume fulltext is enabled in systemconfig, else error is thrown here:
    SelenideElement fullTextField = getParentElement().$(Schrodinger.byDataId("input", "fullTextField")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S);
    return new InputBox<> (this, fullTextField);
  }
}
com.codeborne.selenideSelenideElementclick

Javadoc

Click the element

By default it uses default Selenium method click.

But it uses JavaScript method to click if com.codeborne.selenide.Configuration#clickViaJs is defined. It may be helpful for testing in Internet Explorer where native click doesn't always work correctly.

Popular methods of SelenideElement

  • shouldBe
  • getText
    Get the visible text of this element, including sub-elements without leading/trailing whitespace. NB
  • is
  • shouldHave
  • waitUntil
  • attr
    Get the attribute of the element. Synonym for getAttribute(String).
  • exists
    Checks if element exists true on the current page.
  • getValue
    Get the "value" attribute of the element
  • has
  • hover
  • isDisplayed
    Check if this element exists and visible.
  • isEnabled
  • isDisplayed,
  • isEnabled,
  • pressEnter,
  • setValue,
  • should,
  • text,
  • uploadFile,
  • val,
  • waitWhile

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • JFrame (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Best plugins for Eclipse
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