Skip to content

#1777 Check if foused element is actionable#1801

Merged
zabil merged 6 commits intomasterfrom
fix_write
Jan 18, 2021
Merged

#1777 Check if foused element is actionable#1801
zabil merged 6 commits intomasterfrom
fix_write

Conversation

@NivedhaSenthil
Copy link
Member

  • modify write api to not pre fetch focused element
  • make checking for actionable element on focused element if a selector is not given by user

Signed-off-by: NivedhaSenthil nivedhasenthil@gmail.com

- modify write api to not pre fetch focused element
- make checking for actionable element on focused element if a selector is not given by user

Signed-off-by: NivedhaSenthil <nivedhasenthil@gmail.com>
@NivedhaSenthil NivedhaSenthil requested a review from zabil January 18, 2021 08:36
Signed-off-by: NivedhaSenthil <nivedhasenthil@gmail.com>
@zabil
Copy link
Member

zabil commented Jan 18, 2021

Still failing locally now with this error

 1) write
       into focused element:
     Error: Found too many matches. Please use a selector that is more specific
      at ./taiko/lib/actions/pageActionChecks.js:182:13
      at async waitAndGetActionableElement (lib/actions/pageActionChecks.js:156:3)
      at async write (lib/actions/write.js:56:11)
      at async module.exports.write (lib/taiko.js:1053:16)
      at async module.exports.<computed> (lib/taiko.js:2621:14)
      at async Context.<anonymous> (test/unit-tests/write.test.js:84:5)

  2) write with hideText option
       should mask the text when writing to focused element:
     Error: Found too many matches. Please use a selector that is more specific
      at ./taiko/lib/actions/pageActionChecks.js:182:13
      at async waitAndGetActionableElement (lib/actions/pageActionChecks.js:156:3)
      at async write (lib/actions/write.js:56:11)
      at async Object.module.exports.write (lib/taiko.js:1053:16)
      at async Object.module.exports.<computed> [as write] (lib/taiko.js:2621:14)
      at async Context.<anonymous> (test/unit-tests/write.test.js:224:5)
node --version
v12.20.1

Signed-off-by: NivedhaSenthil <nivedhasenthil@gmail.com>
@NivedhaSenthil
Copy link
Member Author

It was swallowing the actual error because of missed element length initialization. Have pushed a fix, Can you please try again for the right error ?

@zabil
Copy link
Member

zabil commented Jan 18, 2021

It's back showing the same error

1) write
       into focused element:
     Error: is not writable
      at ./taiko/lib/actions/pageActionChecks.js:185:11
      at async waitAndGetActionableElement (lib/actions/pageActionChecks.js:156:3)
      at async write (lib/actions/write.js:56:11)
      at async module.exports.write (lib/taiko.js:1053:16)
      at async module.exports.<computed> (lib/taiko.js:2621:14)
      at async Context.<anonymous> (test/unit-tests/write.test.js:84:5)

  2) write with hideText option
       should mask the text when writing to focused element:
     Error: is not writable
      at ./taiko/lib/actions/pageActionChecks.js:185:11
      at async waitAndGetActionableElement (lib/actions/pageActionChecks.js:156:3)
      at async write (lib/actions/write.js:56:11)
      at async Object.module.exports.write (lib/taiko.js:1053:16)
      at async Object.module.exports.<computed> [as write] (lib/taiko.js:2621:14)
      at async Context.<anonymous> (test/unit-tests/write.test.js:224:5)

Signed-off-by: NivedhaSenthil <nivedhasenthil@gmail.com>
Signed-off-by: NivedhaSenthil <nivedhasenthil@gmail.com>
@gaugebot
Copy link

gaugebot bot commented Jan 18, 2021

@NivedhaSenthil Thank you for contributing to taiko. Your pull request has been labeled as a release candidate 🎉🎉.

Merging this PR will trigger a release.

Please bump up the version as part of this PR.

Instructions to bump the version can found at CONTRIBUTING.md

If the CONTRIBUTING.md file does not exist or does not include instructions about bumping up the version, please looks previous commits in git history to see what changes need to be done.

Signed-off-by: NivedhaSenthil <nivedhasenthil@gmail.com>
@zabil zabil linked an issue Jan 18, 2021 that may be closed by this pull request
@zabil zabil merged commit 5bfdc22 into master Jan 18, 2021
@zabil zabil deleted the fix_write branch March 4, 2022 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Regression in the write API

2 participants