SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Nov 2007
    Posts
    124
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How can change value of slider through QTP

    Hi All,

    My query is... we have a slider in our application, by moving slider it changes its value. Now i have to automate this thing. how can i automate slider?

    Regards,
    Babar
    Life is the Game of Luck

  2. #2
    Senior Member
    Join Date
    Nov 2007
    Posts
    263
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can change value of slider through QTP

    1) Record
    2) Slide the slider

    If that does not generate code you can use then you need to determine just how it was created (i.e. is it MFC/C++, COM, .Net) etc. and use the appropriate plug ins.

    Worse comes to worse, record in Analog mode for the test.

  3. #3
    Member
    Join Date
    Aug 2008
    Posts
    150
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can change value of slider through QTP

    Just a thought but if you can determine the x,y location of each end of the slider you could calculate where on the slider to click, no?

  4. #4
    Senior Member
    Join Date
    Jun 2007
    Location
    IL, US
    Posts
    408
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can change value of slider through QTP

    When you spy on it what is the object Class?

  5. #5
    Senior Member
    Join Date
    Nov 2007
    Posts
    124
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can change value of slider through QTP

    Object class is webelement
    Life is the Game of Luck

  6. #6
    Senior Member
    Join Date
    Oct 2005
    Posts
    240
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can change value of slider through QTP

    Hi,
    When you Spy on the webelement, what is the value of the Test Object Property "html tag"?
    M.

  7. #7
    Member
    Join Date
    Oct 2003
    Location
    Norfolk, VA
    Posts
    360
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can change value of slider through QTP

    One possibility:
    <font class="small">Code:</font><hr /><pre>
    ' used the following site: http://www.aldenta.com/examples/scri...-standard.html
    xval = Browser("micclass:=Browser").Page("micclass:=Page" ).WebElement("html id:=track1").GetROProperty("abs_x")
    yval = Browser("micclass:=Browser").Page("micclass:=Page" ).WebElement("html id:=track1").GetROProperty("abs_y")
    Browser("micclass:=Browser").Page("micclass:=Page" ).WebElement("html id:=track1").Drag xval,yval
    Browser("micclass:=Browser").Page("micclass:=Page" ).WebElement("html id:=track1").Drop xval+10,yval</pre><hr />
    A good rule of thumb is to never measure with your thumb.

  8. #8
    Senior Member
    Join Date
    May 2008
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How can change value of slider through QTP

    Hai steve

    Used what you have suggested but it throws error. This is the script used.

    systemutil.Run "iexplore.exe","http://www.aldenta.com/examples/script.aculo.us/slider-standard.html"
    xval = Browser("micclass:=Browser").Page("micclass:=Page" ).WebElement("html id:=track1").GetROProperty("abs_x")
    Msgbox xval
    yval = Browser("micclass:=Browser").Page("micclass:=Page" ).WebElement("html id:=track1").GetROProperty("abs_y")
    Msgbox yval
    Browser("micclass:=Browser").Page("micclass:=Page" ).WebElement("html id:=track1").Drag xval,yval
    Browser("micclass:=Browser").Page("micclass:=Page" ).WebElement("html id:=track1").Drop xval+10,yval

    Throws error in this line

    Browser("micclass:=Browser").Page("micclass:=Page" ).WebElement("html id:=track1").Drag xval,yval

    Object doesnot support this property or method

    Browser(...).Page(...).WebElement(...).Drag'

    Please let me know where I am going wrong

    Thanks
    The issue what you have listed does not exist, works fine in my machine- stupid comment from the developer

 

 

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 8.33%
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 02:16 AM.

Copyright BetaSoft Inc.