Forum Discussion

ushureddy's avatar
ushureddy
New Contributor
10 years ago

Issue in Entering the numeric value into one of text box.

Scenario:

Social Security Number Field where in it has 3 textboxes:

1st textbox : Should Accept 3 digits

2nd textbox :  Should Accept 2 digits

3rd textbox :Should Accept 4 digits

Manually working as expected.



 During script execution first two textboxes are accepting and also control is shifted to 3rd texbox but s/m will not respond neither enters digits nor stop execution.



But,when you pass 3digits it will accept and test will pass.



Sometimes,when it comes to 3rd textbox stops execution stating device unplugged but actually not.



Request the solution asap.





Thanks,

Usha







2 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Usha,



    If test code uses .SetText() to populate textboxes, try to replace .SetText() with .Keys().

    Otherwise, example of your test code and screenshots will help to understand what might be wrong in your case.
  • Like Alexei suggested use the .keys() method which simulates using the keyboard to input the values.



    I would try re-recording setting the text fields and using the mouse to change between the three fields and type in the values in each of the input fields.