Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add condensed cheat sheet. #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cvakiitho
Copy link
Contributor

@philipphoberg
Copy link

Very useful, thanks!
Regarding the clear() function:
I noticed that some ui5 inputs are not effected by element.clear(). It seems to be some kind of Webdriver issue. (clear() will not take effect if the autocomplete attribute of the target element is 'off' or 'on')
Maybe my workaround is worth an addition to the cheatsheet.

let clear = element => {
  element.getAttribute('autocomplete').then(value => {
    if (value !== 'none') {
      element.getAttribute('value').then(value => {
        let backspace = protractor.Key.BACK_SPACE;
        element.sendKeys(backspace.repeat(value.length));
      });
    } else element.clear();
  });
}; 

@maximnaidenov
Copy link
Contributor

Hi Phillip, thanks for sharing this tip. I will try to work on the guide (remove some practices that I consider dangerous) and merge it very soon, and then I will merge this tip also.

@CLAassistant
Copy link

CLAassistant commented Aug 5, 2020

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants