0

the problem is that i am trying to write a large text using the keyboard_enter_text and everytime this code runs it stops at the half and start again, after sometime it gives me the timeout error.

And I write an large post into post field         # features/step_definitions/my_first_steps.rb:27
  Time out waiting for UIAutomation run-loop for command uia.typeString('new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test new post test ', ''). Waiting for index:3 (RunLoop::TimeoutError)
  ./features/step_definitions/my_first_steps.rb:31:in `/^I write an large post into post field$/'
  features/add_post.feature:19:in `And I write an large post into post field'

I already tried to write at the text field using set_text, but it is deprecated.

How can i solve that?

Thanks in advance.

Igor Matos
  • 33
  • 3

2 Answers2

2

We have started to see this more often on views with deep view hierarchies.

Calabash traverses the entire view hierarchy before typing. It does this because of bugs in UIAutomation. Long time Calabash users will recall the days when strings were incorrectly typed, characters were skipped or duplicated, or typing crashed the app.

The fix was gather as much information as possible about the view hierarchy before typing.

The workaround is to call:

uia("uia.typeString('String to type')")

The downside is that you will not get any of the error checking that Calabash provides. We are investigating this issue.

jmoody
  • 2,480
  • 1
  • 16
  • 22
  • Thanks, @jmoody. But seems that i am getting the same error ` Time out waiting for UIAutomation run-loop for command uia.typeString('large string'). Waiting for index:3 (RunLoop::TimeoutError) ./features/step_definitions/my_first_steps.rb:44:in `/^I write an large post into post field$/'` – Igor Matos Dec 07 '15 at 17:44
-2

Yeah there is some time out issue with run loop, there is work around if want to type long string. you can use same string reduce length and enter three time like this:

Then I use the native keyboard to enter "new post test new post test new post test new post " into the "Email" input field
Then I use the native keyboard to enter "new post test new post test new post test new post " into the "Email" input field
Then I use the native keyboard to enter "new post test new post test new post test new post " into the "Email" input field
Mani
  • 1,199
  • 2
  • 9
  • 22