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

Unable to select the date from 'UIPickerView' #778

Closed
zetendra opened this issue Jun 7, 2018 · 6 comments
Closed

Unable to select the date from 'UIPickerView' #778

zetendra opened this issue Jun 7, 2018 · 6 comments

Comments

@zetendra
Copy link

zetendra commented Jun 7, 2018

Description

Unable to select the date from the date picker. I am able to select the time and AM/PM

Steps to Reproduce

Its not working for the below case
element(by.type('UIPickerView')).setColumnToValue(0, Fri Jun 8');

Its working for the below
element(by.type('UIPickerView')).setColumnToValue(1, '11');
element(by.type('UIPickerView')).setColumnToValue(2, '22');
element(by.type('UIPickerView')).setColumnToValue(3, 'AM');

Can some one help me on this?

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 7.3.6
  • React Native: 0.53.0
  • Node: 8.11.2
  • Device: iPhone 7
  • Xcode: 9.1
  • macOS:

datepicker

@rotemmiz
Copy link
Member

Try to use the layout inspector and see the actual string rendered in the UI, is it exactly Fri Jun 8 ?

@zetendra
Copy link
Author

@rotemmiz Thank you for responding to my query.

I used iOS inspector to find the exact format of the value, i see it is "Thu, Jun 14"
I tried the same in my code, i didnt work. I am attaching the screen shots and pasting the error

await datePicker().setColumnToValue(0, ${day}, ${month} ${date});

` Error: Error: An action failed. Please refer to the error trace below.
Exception with Action: {
"Action Name" : "Set picker column 0 to value 'Thu, Jun 14'",
"Element Matcher" : "((kindOfClass('UIPickerView') && !(kindOfClass('RCTScrollView'))) || (kindOfClass('UIScrollView') && ((kindOfClass('UIView') || respondsToSelector(accessibilityContainer)) && ancestorThatMatches((kindOfClass('UIPickerView') && kindOfClass('RCTScrollView'))))))"
}

Error Trace: [
{
"Description" : "UIPickerView does not contain desired value!",
"Error Domain" : "com.google.earlgrey.ElementInteractionErrorDomain",
"Error Code" : "2",
"File Name" : "GREYPickerAction.m",
"Function Name" : "-[GREYPickerAction perform:error:]",
"Line" : "120"
}
]`

screenshot-1

screenshot-2

@IegorZabielin-KSO
Copy link

facing with the same issue, any look around?

@lochness42
Copy link

Try "Jun 14" or "14 Jun", coming from native XCUITest, that's actual values (depending on locale) that are under the hood and can be selected. I'm currently just looking into Detox so not sure whether it works with it, but I would suspect that it does.

@stale
Copy link

stale bot commented Sep 4, 2018

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.

@stale stale bot added the 🏚 stale label Sep 4, 2018
@stale
Copy link

stale bot commented Sep 11, 2018

The issue has been closed for inactivity.

@stale stale bot closed this as completed Sep 11, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 14, 2018
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

4 participants