Skip to content
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

Closed
igorshubovych opened this issue Mar 5, 2015 · 1 comment
Assignees

Comments

@igorshubovych
Copy link

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

@sjelin sjelin self-assigned this Mar 7, 2015
@sjelin
Copy link
Contributor

sjelin commented Mar 7, 2015

Nice catch! Fixing now

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

No branches or pull requests

2 participants