Search code examples
calabashcalabash-ios

How to set keyboard_enter_text timeout at calabash?


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.


Solution

  • 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