Skip to content

Element.class: HighlightState argument is not used in getText, getAttribute, getCssValue methods #128

@EvgenySafronov

Description

@EvgenySafronov

Element.class has the following methods that have HighlightState argument:

  • public String getText(HighlightState highlightState);
  • public String getAttribute(String attr, HighlightState highlightState);
  • public String getCssValue(String propertyName, HighlightState highlightState).

All of them call this.getJsActions().highlightElement() inside, i.e. without passing the highlightState.
As a consequence the element is highlighted even if called with HighlightState.NOT_HIGHLIGHT which might be quite important e.g. when there is a need to get an element border color via css.

It seems that passing the value to this.getJsActions().highlightElement(highlightState) should solve the issue.

image

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions