Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

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

Open
@yadimon

Description

@yadimon

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions