This file contains 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); | |
} | |
}; | |
} |
This file contains 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 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 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 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
COURSE [Chrome Dev Tools] | |
Arsbatyrov.ru/chrome/main -> | |
https://playground.learnqa.ru/chrome/# | |
Открыть dev tools -> Command+Option+i | |
Вкладка Elements | |
Теги | |
< tag> |
This file contains 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
(интерпретатор - оболочка -> bash for Unix systems) | |
( use this link: https://appleinsider.ru/tips-tricks/mac-os-x-nachinayushhim-o-rabote-v-terminale.html) | |
Интерпретатор zsh по сути улучшенный bash. | |
В заголовке терминала отображен текущий каталог | |
ls посмотреть содержимое текущего каталога (LIST) | |
ls -ltr посмотреть с датой и правами (нижний в списке будет последним добавленным/измененным) |
This file contains 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
COURSE [GIT] | |
https://ru.hexlet.io/courses/intro_to_git | |
Основы Git | |
git --version - посмотреть установленную версию | |
brew install git - установить гит | |
echo "export LANG=en_US.UTF-8" >> ~/.bashrc потом source ~/.bashrc - изменяет язык гита в консоли | |
git config --global user.name "Vitaliy Ismagilov" - установить имя | |
git config --global user.email "[email protected]" - установить почту |
This file contains 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
COURSE [CSS Selectors] | |
Searching is based on Tags and Attributes. | |
Tags: div, input, a, ul, li | |
Attributes: id, class, name, type | |
Special annotations (shortcuts): | |
for id -> #idName | |
For class -> .className |
This file contains 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
Basics | |
Searching is based on Tags and Attributes. | |
Instructions: | |
/ -> absolute xpath, start searching from the root node | |
// -> relative xpath, starts from the node of your choice | |
//* -> we can put * if we don’t want to specify tag name (means ANY tag) | |
[@attributeName] -> @ means attribute in [ ] | |
‘Value’ -> all values we should put inside ‘ ‘ |
This file contains 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
- Double shift -> open search panel; | |
- Command + 1 -> open/close left navigation bar | |
- Command + N -> `New` (in navigation bar) / `Generate` (in main window) | |
- Command + D -> Duplicate the code row | |
- Option + Command + V -> extract variable (every part of line can be extracted). Option 1 | |
- .var - at the end of line to declare variable (postfix completion). Option 2 | |
- Control + Space -> completion (Control + Space x 2 -> suggest variants in case no imports) | |
- Control + Shift + Space -> smart completion (only available options for current type) | |
- Option + Enter -> resolving the problem (e.g. add imports automatically, optimise imports, run test) | |
- Control + Option + O -> optimise imports |
NewerOlder