uia typeString issues

Hello,

Has anyone recently seen some timeout issues when entering numbers? It is not consistent either, here's my error:

    uia action failed because: Timed out running command uia.typeString('<Numbers>', '')
        (RuntimeError)

here are the following commands that I have tried:

    keyboard_enter_text(<Numbers>)

    enter_text("UIFieldEditor text:''", <Numbers>)

    fast_enter_text(<Numbers>)

i'm not too familiar with the uia work but i'm guessing that it's failing in the uia_available, instruments issue possibly? Any help or feedback is welcomed!

Other Version info:
gems: 0.13.0
package: 0.13.0
iOS 8.1 (iPhone 5s)
XCode 6.1 (Instruments 6.1)

Posts

  • AlisonFernandesAlisonFernandes ✭✭ USMember ✭✭

    Have you tried tapping the field first and then entering the data, without referencing the element? )Something similar to keyboard_enter_text or fast_enter_text )

  • JCastroJCastro USMember

    Sadly, yes, I have indeed tried but I still receive the inconsistent results for the actual touching of the field just as the entering with the element. While at first I thought this was a timing issue, I placed a wait_for_element_exists, but it always gets passed the wait; therefore, I know the element is present every time I try to input text. My most recent attempt included just using the uia_set_responder_value(Numbers), which did not work, but if I do an uia_available?, it comes out as true every time(including the times it fails to input the numbers).

  • JCastroJCastro USMember

    After messing around with other options, I have noticed that I am able to enter character by character. It has slowed down the process since it's character by character, but it consistently works. Here is what I am using:

    numbers.each_char do |char|
            begin
                keyboard_enter_char(char, {:should_screenshot => false})
            rescue
                 _search_keyplanes_and_enter_char(char)
            end
    end
    

    I am still open to any other suggestions that may fix the regular input issue.

Sign In or Register to comment.