/** * Deprecated. Use {@code $$.shouldHave(size(expectedSize))} instead. */ public ElementsCollection shouldHaveSize(int expectedSize) { return shouldHave(CollectionCondition.size(expectedSize)); }
private SelenideWait Wait() { return new SelenideWait(webDriver, config.timeout(), config.pollingInterval()); } }
public SelenideWait Wait() { return new SelenideWait(getWebDriver(), config().timeout(), config().pollingInterval()); }
public String confirm(String expectedDialogText) { Alert alert = driver.switchTo().alert(); String actualDialogText = alert.getText(); alert.accept(); checkDialogText(driver, expectedDialogText, actualDialogText); return actualDialogText; }
public ElementsCollection $$(Collection<? extends WebElement> elements) { return new ElementsCollection(driver(), elements); }
private boolean supportsJavascriptAttributes() { return driver.supportsJavascript() && !driver.browser().isHtmlUnit(); }
default SelenideTargetLocator switchTo() { return new SelenideTargetLocator(config(), getWebDriver()); }
public boolean hasWebDriverStarted() { return driver().hasWebDriverStarted(); }
public WebDriverLogs getWebDriverLogs() { return new WebDriverLogs(driver()); }
public String dismiss(String expectedDialogText) { Alert alert = driver.switchTo().alert(); String actualDialogText = alert.getText(); alert.dismiss(); checkDialogText(driver, expectedDialogText, actualDialogText); return actualDialogText; }
public ElementsCollection $$(String cssSelector) { return new ElementsCollection(driver(), cssSelector); }
public String prompt(String expectedDialogText, String inputText) { Alert alert = driver.switchTo().alert(); String actualDialogText = alert.getText(); if (inputText != null) alert.sendKeys(inputText); alert.accept(); checkDialogText(driver, expectedDialogText, actualDialogText); return actualDialogText; }