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.

Firefox and Chrome treats by.buttonText() differently when CSS text-transform is used #1904

@igorshubovych

Description

@igorshubovych

Here is the main extracts from code:

app.css

.my-sick-button {
  text-transform: uppercase;
}

app.html

<button>Button 1</button>

app.spec.js

function () {
  element(by.buttonText('Button 1')).click(); // fails in Chrome, works in Firefox
  element(by.buttonText('BUTTON 1')).click(); // fails in Firefox, works in Chrome
}

When the text is transformed via CSS property text-transform to uppercase, Chrome can find the element only by capitalized text (same as user see it). In the same case, Firefox can find the element by original text (same as written in HTML).

See full demo here:
https://github.com/igorshubovych/protractor-ff-issue

Metadata

Metadata

Assignees

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