This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Скролл в самый верх делаю таким способом - | |
| executeJavaScript("$(document).scrollTop(0)", ""); | |
| Скролл в самый низ делаю таким способом - | |
| window.scrollTo(0,document.body.scrollHeight); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option 1: driver.FindElement(By.CssSelector("body")).SendKeys(Keys.LeftControl + "T"); | |
| Option 2: String selectLinkOpeninNewTab = Keys.chord(Keys.CONTROL,"t"); | |
| Option 3: executeJavaScript("window.open()"); | |
| Option 4: driver.switchTo().window(new ArrayList<>(WebDriverRunner.getWebDriver().getWindowHandles()).get(numberTab - 1)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://github.com/selenide/selenide/wiki/Custom-conditions#moving |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static Condition textIgnoreSpaces(String text) { | |
| return new Condition("text with spaces" + text) { | |
| @Override | |
| @Nonnull | |
| public CheckResult check(Driver driver, WebElement element) { | |
| String textWithSpaces = element.getText(); | |
| return new CheckResult(textWithSpaces.replaceAll("\\s+", "").equals(text), textWithSpaces); | |
| } | |
| }; | |
| } |
OlderNewer