Forum Discussion

smartbearrj's avatar
smartbearrj
Contributor
6 years ago

Cursor is not switched to the other input fields in hybrid mobile application.

Hi ,

 I am automating the functionalities in hybrid mobile application and problem i am facing is below -

 

 My application has a web page which has 3 fields- username ,password and login button. Now I am able to find all the objects in the page but when i am trying to send the string in the password box after successfully sending in username box, password is not being entered in the password box instead it is inserted in the username itself.

 

Please suggest what might be the reason.

 

I had the same issue in desktop mode at long time back but i can not recall what i had done to solve the issue. 

 

Thanks.

 

15 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    a) How input is sent to control in your test code?

    b) Does it help if you set an input focus (.Click() ) or .SetFocus() ) to the required control before entering the text ?

     

    • smartbearrj's avatar
      smartbearrj
      Contributor

      Hi AlexKaras,

      1--  I am trying both - Keys(object ,string) and setText(object, string). 

      2-- I have not tried it yet. I am going to try setFocus and click()

       

       

      Thanks,

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        > I am going to try setFocus and click()

        Yes, please. While <object>.Keys() is expected to put required keys sequence into <object>'s input queue, I've seen the cases when the input was sent to (or intercepted by?) some other control. Explicit input focus setting to the required control always solved this problem.