Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getAttributes() on radio buttons is not working #4370

Open
2 tasks done
pawannomula opened this issue Feb 12, 2024 · 2 comments
Open
2 tasks done

getAttributes() on radio buttons is not working #4370

pawannomula opened this issue Feb 12, 2024 · 2 comments

Comments

@pawannomula
Copy link

pawannomula commented Feb 12, 2024

What happened?

I have a radio container with container id "radio-container", trying to get attributes using below code
const verificationAttributes = await element( by.id('radio-container') ).getAttributes();
tried getAttributes().enabled as well.

My goal is to read labels in the radio container.

What was the expected behaviour?

const verificationAttributes = await element( by.id('radio-container')).getAttributes();
Receiving verificationAttributes = undefined but expected some elements.

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

getAttributes() by Id.

In what environment did this happen?

Detox version: 20.13.15
React Native version:
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version: >= 16
Device model: Iphone 15
iOS version: 17.2
macOS version:
Xcode version:
Test-runner (select one): jest / other Jest

Detox logs

Detox logs
 ● add beneficiary E2E › adding joint owner as a beneficiary

    TypeError: Cannot read properties of undefined (reading 'toLowerCase')

      101 |         ).getAttributes();
      102 |         if (
    > 103 |           verificationAttributes.label.toLowerCase().includes("phone") ||
          |                                        ^
      104 |           verificationAttributes.label.toLowerCase().includes("email")
      105 |         ) {
      106 |           await element(by.id('radio-container')).tap();

      at Login.toLowerCase (screens/login.js:103:40)
      at asyncGeneratorStep (../node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (../node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)

Device logs

Device logs
paste your device.log here!

More data, please!

No response

@pawannomula
Copy link
Author

Screenshot 2024-02-12 at 1 38 12 PM

Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this repository, read this discussion.

@stale stale bot added the 🏚 stale label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant