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

Commit 8a3412e

Browse files
committed
fix(bug): by.buttonText() should not be effected by CSS style
Closes issue #1904
1 parent 29ce5c6 commit 8a3412e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/clientsidescripts.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ functions.findByButtonText = function(searchText, using) {
482482
var element = elements[i];
483483
var elementText;
484484
if (element.tagName.toLowerCase() == 'button') {
485-
elementText = element.innerText || element.textContent;
485+
elementText = element.textContent || element.innerText || '';
486486
} else {
487487
elementText = element.value;
488488
}
@@ -511,7 +511,7 @@ functions.findByPartialButtonText = function(searchText, using) {
511511
var element = elements[i];
512512
var elementText;
513513
if (element.tagName.toLowerCase() == 'button') {
514-
elementText = element.innerText || element.textContent;
514+
elementText = element.textContent || element.innerText || '';
515515
} else {
516516
elementText = element.value;
517517
}

0 commit comments

Comments
 (0)