SPONSORS:






User Tag List

Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    May 2001
    Posts
    389
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Exclamation Is there any way to simulate SLOW user input with UFT?

    Hello colleagues.

    I would like to simulate a slow user's input to a certain text field in my aut.
    Thing is that, the edit field has an auto-complete mechanism that works along with this user.

    Is there a way this can be done using DeviceReplay or any other method?

    Any ideas are welcome.

    Thank-you.
    If it's working... don't touch it!

  2. #2
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,642
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    I had problems with a VB app that letters and such would get dropped when using the Set method. So what I did was write a common method to do all text entry using SendKeys one character at a time with a small delay between each keystroke. Basically take in string, loop through length of string sending one character at a time. Something like that would likely work.

  3. #3
    Member
    Join Date
    May 2001
    Posts
    389
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Hi NoUse4aName

    Do you have an example you can post here?
    Using SENDKEYS or SENDSTRING?

    Thank-you.
    If it's working... don't touch it!

  4. #4
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,642
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    This will get you something that more accurately represents human keyboard input. If your string will have special characters some of those will need special treatment(enclosed in {}) which you could do with an if/select case statement in the loop. Can up the 10ms wait value as appropriate until it triggers the auto complete. But what's the real case you're trying to do here? Just enter a partial string and see if auto complete pops up then select that? In which case you wouldn't want to entire the entire string. So len of string -2 or some such. Then use mouse on replay mouse/kb mode to select it?


    Code:
                            Set wshShell = CreateObject("WScript.Shell")
    			For i = 1 to len(stringToEnter)
    					wshShell.SendKeys mid(stringToEnter,i,1)
    					wait 0,10
    			Next

  5. #5
    Member
    Join Date
    May 2001
    Posts
    389
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Thanks again!

    Could you please explain what this does?

    wait 0,10

    Is it a wait of 100 milliseconds ?

    I think that this is exactly what I need. Thank-you very much.
    If it's working... don't touch it!

  6. #6
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,642
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    0 seconds 10 milliseconds. Obviously can tweak that until you get the behavior you want.

  7. Thanks lior thanked for this post
  8. #7
    Member
    Join Date
    May 2001
    Posts
    389
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Thank-you very ,much for this.
    Issue solved!
    If it's working... don't touch it!

  9. #8
    Advanced Member
    Join Date
    May 2007
    Posts
    618
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    You could also switch the Run Mode from Fast to Normal under Tools | Options | GUI Testing | Test Runs. You can then set a delay that occurs between each execution step. That would slow down everything, though, not just inputs.
    Dennis Belew

  10. #9
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,642
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    Quote Originally Posted by belewda View Post
    You could also switch the Run Mode from Fast to Normal under Tools | Options | GUI Testing | Test Runs. You can then set a delay that occurs between each execution step. That would slow down everything, though, not just inputs.
    That will introduce a delay between steps, yes. But this is a delay within an input step.

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.40 (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.34%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:54 PM.

Copyright BetaSoft Inc.