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
    Junior Member
    Join Date
    Apr 2008
    Location
    India, Hyderabad
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Capturing a screen shot to Test Results for a web

    Hi,
    Is there any function where we can capture a web screen to QTP test results. the parameters can be passed are Browser name and Page name.

    Please help....

    Vani
    Vani

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

    Re: Capturing a screen shot to Test Results for a web

    The Screen Recorder can be used to capture the entire test execution into a movie file but i didn't kind of see any option or function to capture a particular webpage and return it to results.

    Regards,
    bnagarani.

  3. #3
    Junior Member
    Join Date
    Apr 2008
    Location
    India, Hyderabad
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Capturing a screen shot to Test Results for a web

    i want to call this function where ever i need a screen shot by passing the page title. not the entire test execution.
    Vani

  4. #4
    Advanced Member
    Join Date
    Sep 2007
    Location
    Chennai, Tamil nadu, India
    Posts
    999
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Capturing a screen shot to Test Results for a

    Use below, Collected from QTP help.

    Sub CaptureBitmap_Example(strBrowser,strPage,strPath)

    Browser(strBrowser).Page(strPage).CaptureBitmap strPath, True

    End Sub
    i have never seen bugs sleeping

  5. #5
    Junior Member
    Join Date
    Apr 2008
    Location
    India, Hyderabad
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Capturing a screen shot to Test Results for a

    Thanks Prince. this will save the screen shot to the specified location but i want to save the screen to QTP test results for the particular step
    Vani

  6. #6
    Advanced Member
    Join Date
    Sep 2007
    Location
    Chennai, Tamil nadu, India
    Posts
    999
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Capturing a screen shot to Test Results for a

    Then Check here [img]/images/graemlins/wink.gif[/img]

    http://www.advancedqtp.com/knowledge...on-qtp-report/
    i have never seen bugs sleeping

  7. #7
    Senior Member
    Join Date
    Jan 2000
    Location
    USA, CA
    Posts
    1,998
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Capturing a screen shot to Test Results for a

    from kalikota:
    [http://www.sqaforums.com/showflat.ph...rue#Post498138 ]

    Function capture_desktop(Object, Method, Arguments, retVal)
    Dim datestamp
    Dim filename

    datestamp = Now()
    filename = Environment("TestName")&"_"&datestamp& ".png"
    filename = Replace(filename,"/","")
    filename = Replace(filename,":","")
    filename = "C:\QTP_ScreenShots"&"\"&filename
    Desktop.CaptureBitmap filename,true
    Reporter.ReportEvent micFail,"image","<<img src='" & filename & "'>"
    End Function

    Janna

  8. #8
    Junior Member
    Join Date
    Apr 2008
    Location
    India, Hyderabad
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Capturing a screen shot to Test Results for a

    Thanks prince and jbotash for providing the solution.
    Vani

  9. #9
    Moderator
    Join Date
    Jul 2005
    Location
    Delhi
    Posts
    15,575
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)
    Total Downloaded
    0

    Re: Capturing a screen shot to Test Results for a

    Just keep in mind that they are not compatible with QC test results. In the sense when someone else view results they won't see the images as they have hardcoded paths. You should use a shared server to export the test results files if you want.

  10. #10
    Member
    Join Date
    Aug 2008
    Location
    Singapore, Singapore
    Posts
    100
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Capturing a screen shot to Test Results for a

    Try this :



    Public Function snapScreenShot()

    tm=now()
    thisSSName = Year(tm) & "_" & Month(tm) & "_" & Day(tm) & "_" & _
    Hour(tm) & "_"& Minute(tm) & "_" & Second(tm) & "_" & _ & ".bmp"

    Desktop.CaptureBitmap thisSSName, true

    End Function

 

 
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 9.38%
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:12 PM.

Copyright BetaSoft Inc.