SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,596
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    Windows forms navigation

    Has anyone else worked with Windows Forms and QTP?

    Is there a way for a user to navigate back to the top of a form?

    Is there a key combination for going back higher in the form?

    Thanks,

    Kevin

  2. #2
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    Home or ctrl+Home?

    Windows forms you can access the scroll bar control too.
    Last edited by NoUse4aName; 02-27-2014 at 02:14 PM.

  3. #3
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,596
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    NoUse4aName,
    QTP is not seeing the scroll bar in our application.
    I will try CTRL+Home

    What would that be in
    wsh.sendkeys language?

    wsh.sendkeys ("{CTRL}{HOME]")

    I'm not sure.

    I'd sandwich the plus sign in there but I think that would be adding the SHIFT key.

    Thanks,

    Kevin

  4. #4
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,596
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    Replacing CTRL with carat gives me:
    wsh.sendkeys ("^{HOME]")
    Does this look correct?

  5. #5
    Advanced Member venu.adhikesevan's Avatar
    Join Date
    Jun 2010
    Posts
    517
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    Yes it will work...Before this statement try to set focus on the window/page
    Venu
    Today is always better than Tomorrow
    My Blog
    My LinkedIn

  6. #6
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Kevin if that doesn't work here's a crude woraround that might, you may have to set focus as Venu says

    Code:
    UpKeyPresses(20)
    
    Sub UpKeyPresses(presses)
    
    	Set WS = CreateObject("Wscript.Shell")
    
    	For i = 1 To presses
    		Ws.SendKeys "{UP}"
    	Next
    
    	Set WS = Nothing
    
    End Sub
    Mark Smith.

  7. #7
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    wshShell.SendKeys "^{HOME}"

  8. #8
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,555
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    Give this a try too even if it isn't recognizing the scroll in object spy:

    Object.VScroll micScrollStart

  9. #9
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Kew Gardens, United States
    Posts
    2,596
    Post Thanks / Like
    Blog Entries
    1
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    Mark, Venu, NoUse4aName,
    For a reason I don't know, the developers of the application turned off all recognition of scrolling. I manually tried many such as ctrl end, pageup and none of them work.
    I'm asking the software developer why they turned these features off? There forms do take up more than one screen. They scroll down as data is entered, but not through the controls. The vertical slider works, but QTP wont see it.
    I can try
    Object.VScroll micScrollStart
    but the business folks want it to look like the human doing the testing and they don't care for these work arounds.
    Thanks.

  10. #10
    Moderator
    Join Date
    Oct 2010
    Location
    Norway
    Posts
    3,265
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    Kevin,

    You could also try the Type method.

    SwfWindow("SomeForm").Type micCtrlDwn + micHome + micCtrlUp
    Rajkumar

 

 
Page 1 of 2 12 LastLast

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.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:52 PM.

Copyright BetaSoft Inc.