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

Bug: protractor 6.0.0: element.isPresent() returns false if element is disabled #5404

Open
yadimon opened this issue Mar 3, 2020 · 0 comments
Open

Comments

@yadimon
Copy link

@yadimon yadimon commented Mar 3, 2020

Bug report

  • Protractor Version: 6.0.0

element.isPresent() by protractor 6.0.0 returns false in case an element is disabled.
should return true even if the element is disabled

5.4 version:
https://github.com/angular/protractor/blob/release-5.4/lib/element.ts#L1094

return arr[0].isEnabled().then(() => {
  return true;  // is present, whether it is enabled or not
}

Current master and protractor 6.0.0 version:
https://github.com/angular/protractor/blob/master/lib/element.ts#L1057

// is present, whether it is enabled or not
return await arr[0].isEnabled();

wrong modified by this commit:
c0917aa#diff-b9fb06f01b394eaf53b0ff0316aae56dR1074


Possible solution:

// Calling any method forces a staleness check
await arr[0].isEnabled();
return true;
@yadimon yadimon changed the title selenium 4 / protractor 6.x : element.isPresent() returns false if element is disabled Bug: protractor 6.0.0 : element.isPresent() returns false if element is disabled Mar 4, 2020
@yadimon yadimon changed the title Bug: protractor 6.0.0 : element.isPresent() returns false if element is disabled Bug: protractor 6.0.0: element.isPresent() returns false if element is disabled Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.