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

uia_type_string fails to input the correct case or incorrectly touches the wrong character on _devices_ #269

Closed
jmoody opened this issue Dec 22, 2013 · 8 comments
Assignees

Comments

@jmoody
Copy link
Member

jmoody commented Dec 22, 2013

this is new. we have seen problems with the keyboard_enter_char, but with uia_type_string, we have not had problems.

# arrows added for emphasis
expected: 'l!f7F"]E:yM6l#,mE!J-y)~d_ScJi ==> E <== %~.>gR>!iOYbB^h-^$egS'
   found: 'l!f7F"]E:yM6l#,mE!J-y)~d_ScJi ==> e <== %~.>gR>!iOYbB^h-^$egS'

expected: 'Kz?+dc@R#z^/qe##r+oNB+€:MrwBQ~.JAMRr':pW.,_;MN>|#{%'
   found: 'Kz?+dc@R#z^/qe##r+oNB+€:MrwBQ~C'

expected: 'bBg7¥a ==> i <== ,P!xh<n0'e^@a0=2><=_gn,$u@(9xd.43]E#vZ$HHdqh' 
   found: 'bBg7¥q ==> I <== ,P!xh<n0'e^@a0=2><=_gn,$u@(9xd.43]E#vZ$HHdqh'

expected: '}= ==> k <== ,Gk-f"&7{2&ZRq$2zyzsq#y.R,?<R)T;w,xQYm€*3!,Nu?PY' 
   found: '}= ==> I <== ,Gk-f"&7{2&ZRq$2zyzsq#y.R,?<R)T;a,xQYm€*3!,Nu?PY'

for issue #259 i tested 100,000's of key strokes and found no errors on the simulator.

UPDATE: Andrew Reed reported problems on the simulator as well.

the failures where detected on:

  • iOS 7.0.3 iPhone 5C
  • iOS 7.0.4 iPad 4

this is a bug in Apple's UIAutomation - we are simply calling UIA.typeString()

@ghost ghost assigned jmoody Dec 22, 2013
jmoody added a commit to jmoody/briar-ios-example that referenced this issue Jan 3, 2014
@jmoody
Copy link
Member Author

jmoody commented Jan 4, 2014

filed a radar 15748415

@krukow
Copy link
Member

krukow commented Jan 30, 2014

With commit 30b12c8 this should be improved at least in the case of UIA errors.

@jmoody
Copy link
Member Author

jmoody commented Feb 7, 2014

iPhone 5C iOS 7.0.2

OT%.I&k&~[@1p4`wGw$UF^Q{_!+_!E6{DkFz_ON@^E.@.1{eA@ - 'VerboseError: Unable to type: 
OT%.I&k&~[@1p4`wGw$UF^Q{_!+_!E6{DkFz_ON@^E.@.1{eA@

those look like the same string to me.

# could not reproduce with 
10.times { 
    clear_text("textField marked:'top tf'")
    sleep(0.4)
     keyboard_enter_text 'OT%.I&k&~[@1p4`wGw$UF^Q{_!+_!E6{DkFz_ON@^E.@.1{eA@'; sleep(0.4) 
}

UPDATE

after further investigation, i think this a different bug.

#310

@jmoody
Copy link
Member Author

jmoody commented Feb 11, 2014

Apple Bug

UIAKeyboard typeString() does not enter the correct characters on devices
Duplicate of 15699700 (Open)

@thestumonkey
Copy link

I am also getting this issue.
It works absolutely fine on my machine, but my build machine this happens 100% of the time. It can find the views, but it's really slow to type (in some cases doing a long press instead of a normal press). It then crashes out on the verbose error when it tries to touch the next field
I have calabash 0.9.165
This was using keyboard_enter_text

@jmoody
Copy link
Member Author

jmoody commented Feb 24, 2014

@thestumonkey

Are you sure that it is this issue you are seeing?

Or are you seeing this one: #310?

Please inspect the RuntimeError to confirm. Another check is to make sure that the keyboard contains all the characters in your string.

I ask because this particular case is intermittent, the other always occurs.

Is this on a device or the simulator?

@thestumonkey
Copy link

I was sent to this page from this forum thread which describes my issue
https://groups.google.com/forum/#!topic/calabash-ios/UodC_Akk-Ho
My issue happens on the simulator and happens 100% on one machine, but 0% on a different machine with the same codebase. My string does not contain any odd characters, however the keyboard does seem to be trying to type some strange characters as it types very slowly. Maybe the error message I am getting is a symptom of anoher bug which is causing it to try to write an anvalid character?

@jmoody
Copy link
Member Author

jmoody commented Jul 31, 2014

related: http://openradar.appspot.com/radar?id=6431756878086144

17869497 UIAKeyboard.typeString() cannot set value on invalid element: UIATextField

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

3 participants