Skip to content

Commit

Permalink
#312 Make value check case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
NivedhaSenthil committed Jan 7, 2019
1 parent e2fde70 commit bc2cd8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Expand Up @@ -63,4 +63,8 @@ docs/api.md
docs/index.md

#local chromium
.local-chromium
.local-chromium

#test report
test/functional-tests/reports/
test/functional-tests/.gauge/
2 changes: 1 addition & 1 deletion lib/taiko.js
Expand Up @@ -1417,7 +1417,7 @@ function match(text, ...args) {
validate();
assertType(text);
const get = async (e = '*') => {
let elements = await $$xpath('//' + e + `[@value=${xpath(text)}]`);
let elements = await $$xpath('//' + e + `[translate(normalize-space(@value),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")=${xpath(text)}]`);
if (!elements || !elements.length) {
const xpathToText = xpath(text.toLowerCase());
const xpathToTranslateInnerText = 'translate(normalize-space(.),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")';
Expand Down

0 comments on commit bc2cd8d

Please sign in to comment.