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

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

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

origin: Evolveum/midpoint

public PrismForm<FormSubmitablePage> form (){
  if(!element.exists()){
  throw new SchrodingerException("Dynamic form not present");
  }
  return new PrismForm<>(this, element);
}
origin: Evolveum/midpoint

public Boolean isError() {
  return getParentElement().$(By.cssSelector("div.feedback-message.box.box-solid.box-danger")).waitUntil(Condition.appears, MidPoint.TIMEOUT_LONG_1_M).exists();
}
origin: Evolveum/midpoint

public Boolean isInfo() {
  return getParentElement().$(By.cssSelector("div.feedback-message.box.box-solid.box-info")).waitUntil(Condition.appears, MidPoint.TIMEOUT_LONG_1_M).exists();
}
origin: Evolveum/midpoint

public Boolean isSuccess() {
  return getParentElement().$(By.cssSelector("div.feedback-message.box.box-solid.box-success")).waitUntil(Condition.appears, MidPoint.TIMEOUT_LONG_1_M).exists();
}
origin: Evolveum/midpoint

public Boolean isWarning() {
  return getParentElement().$(By.cssSelector("div.feedback-message.box.box-solid.box-warning")).waitUntil(Condition.appears, MidPoint.TIMEOUT_LONG_1_M).exists();
}
origin: Evolveum/midpoint

public FocusSetAssignmentsModal<T> selectType(String option) {
  SelenideElement tabElement = $(Schrodinger.byElementValue("a", "class", "tab-label", option))
      .waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT_2_S);
  String classActive = tabElement.attr("class");
  tabElement.click();
  if (!classActive.contains("active")) {
    $(Schrodinger.byElementValue("a", "class", "tab-label", option))
        .waitUntil(Condition.attribute("class", classActive + " active"), MidPoint.TIMEOUT_DEFAULT_2_S).exists();
  }
  return this;
}
origin: alfa-laboratory/akita

/**
 * Скроллит страницу вниз до появления элемента каждую секунду.
 * Если достигнут футер страницы и элемент не найден - выбрасывается exception.
 */
@И("^страница прокручена до появления элемента \"([^\"]*)\"$")
public void scrollWhileElemNotFoundOnPage(String elementName) {
  SelenideElement el = null;
  do {
    el = akitaScenario.getCurrentPage().getElement(elementName);
    if (el.exists()) {
      break;
    }
    executeJavaScript("return window.scrollBy(0, 250);");
    sleep(1000);
  } while (!atBottom());
  assertThat("Элемент " + elementName + " не найден", el.isDisplayed());
}
origin: alfa-laboratory/akita

/**
 * Скроллит страницу вниз до появления элемента с текстом из property файла, из переменной сценария или указанному в шаге каждую секунду.
 * Если достигнут футер страницы и элемент не найден - выбрасывается exception.
 */
@И("^страница прокручена до появления элемента с текстом \"([^\"]*)\"$")
public void scrollWhileElemWithTextNotFoundOnPage(String expectedValue) {
  SelenideElement el = null;
  do {
    el = $(By.xpath(getTranslateNormalizeSpaceText(getPropertyOrStringVariableOrValue(expectedValue))));
    if (el.exists()) {
      break;
    }
    executeJavaScript("return window.scrollBy(0, 250);");
    sleep(1000);
  } while (!atBottom());
  assertThat("Элемент с текстом " + expectedValue + " не найден", el.isDisplayed());
}
origin: Evolveum/midpoint

private SelenideElement findProperty(String name) {
  Selenide.sleep(5000);
  SelenideElement element = null;
  boolean doesElementAttrValueExist = $(Schrodinger.byElementAttributeValue(null, "contains",
      Schrodinger.DATA_S_QNAME, "#" + name)).exists();
  if (doesElementAttrValueExist) {
    element = $(Schrodinger.byElementAttributeValue(null, "contains",
        Schrodinger.DATA_S_QNAME, "#" + name)).waitUntil(Condition.visible, MidPoint.TIMEOUT_DEFAULT_2_S);
  } else {
    element = $(By.xpath("//span[@data-s-id=\"label\"][contains(.,\"" + name + "\")]/..")).waitUntil(Condition.visible, MidPoint.TIMEOUT_MEDIUM_6_S)
        .parent().waitUntil(Condition.visible, MidPoint.TIMEOUT_MEDIUM_6_S);
  }
  return element;
}
com.codeborne.selenideSelenideElementexists

Javadoc

Checks if element exists true on the current page.

Popular methods of SelenideElement

  • click
    Click the element with a relative offset from the upper left corner of the element
  • 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).
  • 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

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Notification (javax.management)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top plugins for WebStorm
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