Thursday, July 31, 2014

Check if web Page has horizontal and vertical Scrollbars

The following code will be able to tell if the web page has a horizontal or vertical scrollbars. And function GetScrollbarState accepts two arguments:
1. The  document (i.e., Browser(“MyBrowser”).Page(“MyPage”).Object)
2. The direction of the scrollbar – “h” for horizontal or “v”” for vertical. 
This function will returns true or false if there is a scrollbar in the given direction

Function GetScrollBarState(ByRef document, ByVal scrollbarDir)
    Dim result
    Dim root    
    OnErrorResumeNext
    SelectCase LCase(document.compatMode)
        Case"backcompat"
            Set root = document.body
        CaseElse
            Set root = document.documentElement
    EndSelect
    
    SelectCase LCase(scrollbarDir)
        Case"h"
            scrollbarDir = "horizontal"
            result = (root.scrollWidth > root.clientWidth)
        Case"v"
            scrollbarDir = "vertical"
            result = (root.scrollHeight > root.clientHeight)
    EndSelect    
    
    If Err.Number <> 0 Then
        Reporter.ReportEvent micWarning, "GetScrollBarState", "Could not get state for " & scrollbarDir & " scrollbar"
        result = "Undefined"
        Err.Clear
    EndIf
    GetScrollBarState = result
EndFunction
 
 
The following two functions will be used as Page properties using QTP/UFT RegisterUserFunc:
 
Function HasHorizontalScrollbar(ByRef oPage)
    HasHorizontalScrollbar = GetScrollBarState(oPage.Object, "h")
EndFunction
 
Function HasVerticalScrollbar(ByRef oPage)    
    HasVerticalScrollbar = GetScrollBarState(oPage.Object, "v")
EndFunction
 
RegisterUserFunc "Page", "HasHorizontalScrollbar", "HasHorizontalScrollbar"
RegisterUserFunc "Page", "HasVerticalScrollbar", "HasVerticalScrollbar"
 
'Usage with QTP/VBScript Code
Set oPage = Browser("Browser").Page("Page") 
Print oPage.HasHorizontalScrollbar
Print oPage.HasVerticalScrollbar

**** Special thanks to Meir Bar-Tal for such a great function which made our work easy *****

Tuesday, February 18, 2014

how to Download HP Quality Center 11.50

Download the latest version of QC 11.50 evaluation version from the hp site below.

Download Quality Center 11.50

Steps to Download:
1.   Open the above link
2.   Click on the "Try Quality Center Enterprise Now" button

3.   Click on Next button

4.   Fill the information about your self to valid information and send the conformation email to your email id.
Note: licence information also sent to this email id

5.   Click on I agree button to accept the terms of use

6.   Now you will be able to see list of download links

7.   Download this Software, HP QC/ALM11.50 Windows English (T7333-15018.ISO)
8.   Make sure your download file is not corrupted before installation
9.   Extract the ISO file using the software’s available in your system
10. You have the setup to install the Quality Center 11.50 trail version

Let me know by comments, if you want more information on the HP QC 11.50 installation or struck with download.

What's New in the HP Functional Testing 11.5 Suite

What's New in the HP Functional Testing 11.5 Suite

HP Unified Functional Testing(UFT) = HP QuickTest Pro(HPQTP) + HP Service Test(HPST)
Quick Test Professional (QTP) is functional automation testing tool and Service Test (ST) will available in single package to serve the Automation testing needs prominently.
HP UFT 11.5 features are defined by its advanced accessibility of the tools which incorporated in the hp uft 11.5 interface

Click here to view the Presentation from HP.

Monday, February 17, 2014

How to download HP QTP 11.5/ HPUFT 11.5?

What is HP UFT and how it is different from the traditional QTP?

HP Unified Functional Testing (HP UFT) tool is previously known as Quick Test Professional (QTP) and HP Quick Test Professional (HPQTP), it’s combination of HP Quick Test Professional and HP Service Test into a single software package.
HP released the latest version of QTP 11.5 (Unified Functional Testing – UFT 11.5) and Now question is
how to download HP UFT/QTP 11.5 from HP site!!! we can download and use this tool for evaluation or licensed purpose.

Steps to Download:
1. Step by Step process to download QTP/UFT 11.5
2. Click here to download HP QTP/UFT 11.50
3. Click on “Trials and Demos” down arrow 
4. Select “HP Unified Functional Testing 11.50 CC English SW E-Media Evaluation“ and click 


5. Enter your personal details and click Next button.

6. Click on Agree button to accept Software Terms of Use.

7. Select “Using Standard Download” from the drop down.
8. Now Click on “Download” links to download the QTP/UFT 11.5 Software and PDF letter from HP.

9. As the software download file is approximately 1.7 GB and it may take more than ***2 hours’ time depends up on your internet correction speed
10.  Make sure your download is not corrupted before installation
11.    Once zip “Software_HP_UFT_11.50_English_T6510-15080” file Downloaded then extract using the unzipping software’s available in your system
12.    Now you are ready to install the HP Unified Functional Testing or Quick Test Professional 11.5 tool.