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

by.cssContainingText works differently on Chrome and Firefox #1217

Closed
juliemr opened this issue Aug 20, 2014 · 3 comments
Closed

by.cssContainingText works differently on Chrome and Firefox #1217

juliemr opened this issue Aug 20, 2014 · 3 comments

Comments

@juliemr
Copy link
Member

juliemr commented Aug 20, 2014

Report is that if the element uses text-transform (http://www.w3schools.com/cssref/pr_text_text-transform.asp), one browser will match uppercase and one will match in original case. We should see if there's a way to unify these that makes sense.

@hege91
Copy link
Contributor

hege91 commented Aug 22, 2014

Just made a pull request with a test on this case

#1224

@szimek
Copy link
Contributor

szimek commented Sep 4, 2014

I'm having exactly the same issue.

Switching

element.innerText || element.textContent

to

element.textContent || element.innerText

in

var elementText = element.innerText || element.textContent;
would actually fix the issue or at least the different behaviour on Chrome and Firefox. The same code is in findByButtonText and findByPartialButtonText methods.

On Chrome element.innerText returns modified text and element.textContent returns unmodified text.
On Firefox element.innerText returns undefined and element.textContent returns unmodified text.

@juliemr juliemr self-assigned this Oct 2, 2014
@juliemr juliemr closed this as completed in 0858280 Oct 2, 2014
@szimek
Copy link
Contributor

szimek commented Oct 2, 2014

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

No branches or pull requests

3 participants