Tuesday, 10 February 2015

UFT 12.02 Latest Features

 
 
 
 

UFT 12.02 Latest Features

 
Unified Functional Testing 12.02 adds the following new features, product enhancements, and supported technologies:
·       Support for Mobile: You can now configure UFT to connect to the HP Mobile Center and record and run functional tests on mobile applications running on real devices hosted on HP Mobile Center.
HP Mobile Center addresses the challenge of optimizing mobile app quality by integrating natively with UFT. Connect your devices to HP Mobile Center and immediately start testing.
·         Enhanced Chrome Support: UFT can now record on Chrome applications in versions of Chrome 31 or higher. In addition, the following Web 2.0 Add-ins now support Chrome: jQueryUI, Dojo, Google Web Toolkits and SiebelOpenUI.
·         Additional Flex Support: Using the Flash Player Debugger, you can now use UFT to test Flex applications without using the Flex Runtime Loader. In addition, UFT can now recognize Flex controls embedded inside list items or table cells.
·         Additional support for SAP applications: UFT can now recognize and interact with objects from SAP NetWeaver Business Client for Desktop applications and additional SAPUI5 objects.
·         Integration with Subversion (SVN) (Technology Preview Level): You can now use SVN to update and commit changes to your testing documents directly from UFT and use other core SVN functionalities as well, including resolving repository conflicts, running diff comparisons between versions of testing assets, and reverting testing assets to a previous revision.
·        New Demo Application: UFT now has a fully unified demo application on which you can practice and demonstrate both GUI and API testing.
·        UFT provides new Web Sockets activities for API testing to test the communication of your application’s web sockets.
·        If your tests and resources are saved in ALM, you can choose to automatically convert relative paths of resources associated with your GUI tests to absolute paths to improve test run performance.
·        You can now use Run conditions for individual components or business process flows in a BPT test.
·        You can use Jenkins environment parameters to specify the path to a UFT test. This parameter in turn enables the Jenkins plugin to run the UFT test.
·        In the HP UFT Object Model Reference for GUI Testing, all of the information about an object’s supported methods is included in the specific object’s help page.

UFT now supports the following technologies:

·         Updated support for the latest versions of Chrome and Firefox
·         Chrome 64-bit (starting from Chrome 37)
·         Flex 4.12
·         Oracle 12.1.3
·         Full support for Windows Server 2012 R2
·         jQueryUI 1.10.4 and 1.11.0
·         Dojo 1.9/1.10
·         Siebel 8.1.1.9
·         SiebelOpenUI 8.1.1.11
·         AngularJS
 
 

HP UFT 12.02 Released or QTP Latest Version


 
Post details Overview:
1) Download UFT 12.02
2) Installation of UFT 12.02

Download UFT 12.02

Package size ( Software_HP_UFT_12.02_MLU_T6510-15086.zip) : 1.66 GB
Step 1: Click on the link below and accept the free trail
 
 
Step 2: Click on I Agree button at the bottom

Step 3: Click on the Download Link (Software, HP UFT 12.02)
Step 4: HP Download Manager will start your downloading

Installing UFT 12.02

  • UFT installation is faster when compared to previous versions. User doesn't need to do any post installation activities
  • The installation process includes all of the configurations needed to run UFT. You no longer have to run additional post-installation programs
Assume the download version of UFT 12.02 is available (usually ZIP file) and it is unzipped. Once Unzipped the content will look like the once shown below

Step 1) Double click on the Setup.exe file to start the installation process
Step 2) HP UFT 12.02 wizard will popup and User can click the option as shown below ( i.e., Unified Functional Testing Setup)

Step 3) Click on the Next button to continue installation


Step 4) Accept the License agreement by selecting the "I accept the terms in the License Agreement" and click on Next


Step 5) Select the add-in needed for your use. Please not Mobile Plugin is now part of Add-in's which is a new change from UFT 12.01 to UFT 12.02 and click on next button



Step 6) Click on the Install button to continue installation.



Step 7) Click on finish button once installation is complete

 
License wizard will help fresh installation users can Choose the type of License.Users can choose Seat or Concurrent license.




Note :- UFT 12.02 will work for 30 days in Trail mode

Happy Reading!
Sreenu Babu

UFT - QTP How to open a Browser using UFT and VB Script

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview


'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'Comments
'Author : Sreenu Babu
'Date :-
'Purpose :- To Open a Browser using UFT and VB Script
'Usage :- Call OpenApplication( www.google.com, google)
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Function OpenApplication( byval WebURL, byval BrowserTitleName)
BrowserTitleName = TitleName
ApplicationName = WebURL
 Set objIe = createobject("internetexplorer.application")
 objIe.visible = true
 objIe.navigate cstr(ApplicationName)
 wait 3
    If browser("name:=.*"& TitleName  &".*").exist(5) Then
  Reporter.ReportEvent 4,"OpenApplication", "Navigagtion to page  " & ApplicationName
  Reporter.ReportEvent micPass,"OpenApplication" , "Opened Applcaiton "&TitleName
  OpenApplication =0
  else
  Reporter.ReportEvent 4,"OpenApplication", "Navigagtion to page " & ApplicationName
  Reporter.ReportEvent micFail,"OpenApplication","Unable to open page "&TitleName
  OpenApplication =1
 End If
End Function


Regards,
Sreenu Babu

Post that you may be interested in
How to maximize Browser using QTP/UFT



                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Sunday, 8 February 2015

Difference between GetRef and Eval




Difference between GetRef and Eval
We cannot use GetRef when we have the required function call in different library ( Example if we have a sample function with name "TestEval" in a different library apart from where we have called GetRef to the function "TestEval". it will not work). we cannot use GetRef as it expects the function within its scope in the current library

On other hand Eval will work irrespective of where your Function is placed in library ( provided your library is associated to your test)

Example of using EVAL using multiple parameters:-

msg1 = "Hi "
msg2 = "Readers "
FunctionName = "TestEval"
Call Eval(FunctionName & chr(40) & "msg1" & chr(44) & "msg2" & chr(41))

Function TestEval(byval firstmessage, byval SecondMessage)
    msgbox firstmessage
    msgbox SecondMessage
    message = firstmessage & " " &  SecondMessage
     msgbox message
End Function

Example of using GetRef using multiple parameters:-

msg1 = "Hi "
msg2 = "Readers "
FunctionName = "TestEval"

Call GetRef(FunctionName)(msg1,msg2)

Function TestEval(byval firstmessage, byval SecondMessage)
    msgbox firstmessage
    msgbox SecondMessage
    message = firstmessage & " " &  SecondMessage
     msgbox message
End Function

Happy Reading,
Sreenu Babu




 

Tuesday, 27 January 2015

UFT - QTP - Function for getting current date in YYYY-MM-DD-HH-MM-SS format


Some time you may have the need to format date and time in various formats.. hope this function will help you align your needs.


Function for getting current date in YYYY-MM-DD-HH-MM-SS format


Function GetFormatedCurrentDate()
 GetFormatedCurrentDate = 0, 
IfLen(Month(now)) = 1Then
  CurrentMonth = 0 & Month(now)
   else
  CurrentMonth = Month(now)
EndIf
IfLen(Day(now)) = 1Then
 CurrentDay = 0 & Day(now)
else
 CurrentDay = Day(now)
EndIf
IfLen(Hour(now)) = 1Then
 CurrentHour = 0 & Hour(now)
else
 CurrentHour = Hour(now)
EndIf
IfLen(minute(now)) = 1Then
    Currentminute = 0 & minute(now)
    Else
    Currentminute = minute(now)
EndIf
IfLen(Second(now)) = 1Then
    CurrentSecond = 0 & Second(now)
    else
    CurrentSecond = Second(now)
EndIf, 
 GetFormatedCurrentDate = Year(now) & - & CurrentMonth & - & CurrentDay & T & CurrentHour & : & Currentminute & : & CurrentSecond", 
EndFunction



 

Thursday, 22 January 2015

UFT - QTP- How to Maximize a Browser or Maximize Internet Explorer

 

Here is a simple code that could help
 
Set objPage = Browser("name:=Nameofbrowser").page("title:=titleofbrowser")

Call BrowserMaximize(objpage)

Function BrowserMaximize(byval ObjPage)
    On Error resume next
    If objpage.Exist Then
        width = objPage.Object.parentwindow.screen.width
        height = objPage.Object.parentwindow.screen.height
        objpage.Object.Parentwindow.moveto 0,0
        objpage.Object.Parentwindow.resizeto width,height
        Reporter.ReportEvent micPass,"BrowserMaximize","Browser maximized"
    else
        Reporter.ReportEvent micFail,"BrowserMaximize","Browser/Page object does not exist"
    End If
    Err.clear
End Function
 
Or

Some may be using the Object Repository for the same purpose

Browser().page().Maximize may be also used in that case
 
 
 

Sunday, 18 January 2015

UFT - QTP - How to check for presence of string on a web page


                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Function WebElement_CheckStringExistance(byval objPageName, byval InpPropertyname, byval InpPropertyvalue,byval outPropertyName, byval Index, byval strValueToverify)
  WebElement_CheckStringExistance = 0
  Set ObjPage= objPageName
   If Index ="" Then
    If ObjPage.WebElement(InpPropertyname & ":="& InpPropertyvalue).exist(10) then
    ObjPage.WebElement(InpPropertyname &":="& Inppropertyvalue).highlight ' comment later
    strvalue=ObjPage.WebElement(InpPropertyName &":="& Inppropertyvalue).GetROProperty(outPropertyName)
    Reporter.ReportEvent 4"WebElement_CheckStringExistance""Checking for string value "& strValueToverify
    Reporter.ReportEvent micPass,"WebElement_CheckStringExistance","Webelement  with Property " & InpPropertyName & "Property Value " & InpPropertyvalue & "Found"
    If instr(1,strvalue, strValueToverify) > 0Then
     Reporter.ReportEvent micPass,"WebElement_CheckStringExistance","String with value " & strValueToverify &"Found in webelement"
     WebElement_CheckStringExistance =0
    else
     Reporter.ReportEvent micfail,"WebElement_CheckStringExistance","String with value " & strValueToverify &"not found in webelement"
     WebElement_CheckStringExistance =1
    End If
   Else
    Reporter.ReportEvent 4"WebElement_CheckStringExistance""Checking for string value "& strValueToverify
    Reporter.ReportEvent micfail,"WebElement_CheckStringExistance","Webelement  with Property " & InpPropertyName & "Property Value " & InpPropertyvalue & "Found"
    WebElement_CheckStringExistance = 1
  End if
 else
  If ObjPage.WebElement(InpPropertyname & ":="& InpPropertyvalue , "Index:=" & Index).exist(10) then
    ObjPage.WebElement(InpPropertyname &":="& Inppropertyvalue,  "Index:=" & Index).highlight ' comment later
    strvalue=ObjPage.WebElement(InpPropertyName &":="& Inppropertyvalue,  "Index:=" & Index).GetROProperty(outPropertyName)
    Reporter.ReportEvent 4"WebElement_CheckStringExistance""Checking for string value "& InpPropertyvalue
    Reporter.ReportEvent micPass,"WebElement_CheckStringExistance","Webelement  with Property " & InpPropertyName & "Property Value " & InpPropertyvalue & "Found"
    If instr(1,strvalue, strValueToverify) > 0Then
     Reporter.ReportEvent micPass,"WebElement_CheckStringExistance","String with value " & strValueToverify &"Found in webelement"
     WebElement_CheckStringExistance =0
    else
     Reporter.ReportEvent micfail,"WebElement_CheckStringExistance","String with value " & strValueToverify &"not found in webelement"
     WebElement_CheckStringExistance =1
    End If
   Else
    Reporter.ReportEvent 4"WebElement_CheckStringExistance""Checking for string value "& strValueToverify
    Reporter.ReportEvent micfail,"WebElement_CheckStringExistance","Webelement  with Property " & InpPropertyName & "Property Value " & InpPropertyvalue & "Found"
    WebElement_CheckStringExistance = 1
  End if
 End if
End Function

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview
 

UFT - QTP - How to check presence of a Edit box or webedit on web page


                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview


Function VerifyWebEdit_Existance(byval objPageName,  byval PropertyName, byval propertyvalue, byval Index)
   Set ObjPage= objPageName
   If Index ="" Then
    If ObjPage.WebEdit(PropertyName&":="&propertyvalue).exist(10) then
        ObjPage.WebEdit(PropertyName&":="&propertyvalue).highlight ' comment later
        Reporter.ReportEvent 4"VerifyWebEdit_Existance""Checking for Edit box "& propertyvalue
        Reporter.ReportEvent micPass,"VerifyWebEdit_Existance","Edit box with Property " & PropertyName & "Property Value " & propertyvalue & "Found"
        VerifyWebEdit_Existance =0
   Else
    Reporter.ReportEvent 4"VerifyWebEdit_Existance""Checking for Edit Box"& propertyvalue
    Reporter.ReportEvent micFail,"VerifyWebEdit_Existance","Edit Box with Property " & PropertyName & "Property Value " & propertyvalue & "was not Found or available"
    VerifyWebEdit_Existance = 1
  End if
 else
  If ObjPage.WebEdit(PropertyName&":="&propertyvalue, "Index:="&Index).exist(10) then
    Reporter.ReportEvent 4"VerifyWebEdit_Existance""Checking for Edit Box"& propertyvalue
    Reporter.ReportEvent micPass,"VerifyWebEdit_Existance","Edit Box with Property" & PropertyName & "Property Value" & propertyvalue & "Found"
    VerifyWebEdit_Existance =0
   Else
    Reporter.ReportEvent 4"VerifyWebEdit_Existance""Checking for Edit Box"& propertyvalue
    Reporter.ReportEvent micFail,"VerifyWebEdit_Existance","Edit box with Property" & PropertyName & "Property Value" & propertyvalue & "was not Found or available"
    VerifyWebEdit_Existance = 1
  End if
 End If
End Function


                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Thursday, 8 January 2015

UFT - QTP How to Click on Link on Web page

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Function ClickOnLink(byval objPageName,  byval PropertyName, byval propertyvalue, byval Index)
 Set ObjPage= objPageName
   If Index ="" Then
    If ObjPage.Link(PropertyName&":="&propertyvalue).exist(10) then
    ObjPage.Link(PropertyName&":="&propertyvalue).highlight ' comment later
    ObjPage.Link(PropertyName&":="&propertyvalue).click
    Reporter.ReportEvent 4"ClickOnLink""Checking for Link"& propertyvalue
    Reporter.ReportEvent micPass,"ClickOnLink","Link with Property " & PropertyName & "Property Value " & propertyvalue & "Found"
    Reporter.ReportEvent micPass,"ClickOnLink","Link with Property " & PropertyName & "Property Value " & propertyvalue & "Clicked"
    ClickOnLink =0
   Else
    Reporter.ReportEvent 4"ClickOnLink""Checking for Link"& propertyvalue
    Reporter.ReportEvent micFail,"ClickOnLink","Link with Property " & PropertyName & "Property Value " & propertyvalue & "was not Found or available"
    ClickOnLink = 1
  End if
 else
  If ObjPage.Link(PropertyName&":="&propertyvalue, "Index:="&Index).exist(10) then
    ObjPage.Link(PropertyName&":="&propertyvalue, "Index:="&Index).click
    Reporter.ReportEvent 4"ClickOnLink""Checking for lmage "& propertyvalue
    Reporter.ReportEvent micPass,"ClickOnLink","Link with Property " & PropertyName & "Property Value" & propertyvalue & "Found"
    Reporter.ReportEvent micPass,"ClickOnLink","Link with Property " & PropertyName & "Property Value " & propertyvalue & "Clicked"
    ClickOnLink =0
   Else
    Reporter.ReportEvent 4"ClickOnLink""Checking for Link"& propertyvalue
    Reporter.ReportEvent micFail,"ClickOnLink","Link with Property  " & PropertyName & "Property Value" & propertyvalue & "was not Found or available"
    ClickOnLink = 1
  End if
 End If
End function

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

UFT - QTP - How to click on Image on web page

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Function ClickOnImage(byval objPageName,  byval PropertyName, byval propertyvalue, byval Index)
 Set ObjPage= objPageName
   If Index ="" Then
    If ObjPage.Image(PropertyName&":="&propertyvalue).exist(10) then
    ObjPage.Image(PropertyName&":="&propertyvalue).highlight ' comment later
    ObjPage.Image(PropertyName&":="&propertyvalue).click
    Reporter.ReportEvent 4"ClickOnImage""Checking for lmage"& propertyvalue
    Reporter.ReportEvent micPass,"ClickOnImage","Image with Property " & PropertyName & "Property Value " & propertyvalue & "Found"
    Reporter.ReportEvent micPass,"ClickOnImage","Image with Property " & PropertyName & "Property Value " & propertyvalue & "Clicked"
    ClickOnImage =0
   Else
    Reporter.ReportEvent 4"ClickOnImage""Checking for Image"& propertyvalue
    Reporter.ReportEvent micFail,"ClickOnImage","Image with Property " & PropertyName & "Property Value " & propertyvalue & "was not Found or available"
    ClickOnImage = 1
  End if
 else
  If ObjPage.Image(PropertyName&":="&propertyvalue, "Index:="&Index).exist(10) then
   ObjPage.Image(PropertyName&":="&propertyvalue, "Index:="&Index).click
    Reporter.ReportEvent 4"ClickOnImage""Checking for lmage "& propertyvalue
    Reporter.ReportEvent micPass,"ClickOnImage","Image with Property " & PropertyName & "Property Value" & propertyvalue & "Found"
    Reporter.ReportEvent micPass,"ClickOnImage","Image with Property " & PropertyName & "Property Value " & propertyvalue & "Clicked"
    ClickOnImage =0
   Else
    Reporter.ReportEvent 4"ClickOnImage""Checking for lmage"& propertyvalue
    Reporter.ReportEvent micFail,"ClickOnImage","Image with Property  " & PropertyName & "Property Value" & propertyvalue & "was not Found or available"
    ClickOnImage = 1
  End if
End If
End function

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Monday, 22 December 2014

Object Recognition with Flex Add-in or Getting ready to work with Flex Add-in Using UFT or QTP

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview

Object Recognition with Flex Add-in or Getting ready to work with Flex Add-in Using UFT or QTP

 


Requirements


Flex Application Automated Testing and the QTP agent require installing the following:

  • Flash Player ActiveX control, version 9.0.28.0 or higher
  • Microsoft Internet Explorer, version 6 or later
  • Mercury Quick Test Professional 9.2 and patch 1701, Quick Test Professional 9.5 or UFT or Higher version
  • Adobe Flex 3 Plug-in for Mercury Quick Test Pro or higher




Note:- Flex add-in is now directly available with UFT versions and no need for explicit download from Adobe.

Installation

1.     Flex Builder 3 professional and the QTP add-in will be present in the path <Drive>\Program Files\Adobe\Flex Builder 3\Installers\

2.     QTP_Plugin_Installer.exe Run this exe file and this will install the Add-in.

Note:-

For Add-in installation we can copy only the add-in and install it is not necessary to install Flex Builder 3 professional.

Verification

1.     GO to registry and verify the following dll’s is present
  • TEAPluginIE.dll
  • TEAPluginQTP.dll
Note:-   If this dll’s are Registry is not present then it means that the Add-in is not installed properly.

2.    Test the Flash player version, the following link will test flash player version in your browser: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_15507

3.     Verify TEAFlexAgentIE Class is present in the IE Add-ons.


4.     Verify after installation the Flex Add-in is present as shown in the below Snapshot.


Setting applications for testing or Flex Project


We have to pre-compile the test application has the functional testing classes are embedded in the application at compile time, and the application has no external dependencies for automated testing at run time. The below are steps to configure the application for automation testing.

 1.     Start Flex Builder.

2.     Create a new Flex Project.

3.     Select your new Flex project in the Navigator.

4. Flex Build Path

1.     Right Click on the Project. and Select Properties
2.     Select “Flex Build Path” from the Left panel List.
3.     Click on the Library Path Tab in the Right panel.

 This is the list of Libraries to be added while compiling the project

1.     automation.swc
2.     automation_agent.swc
3.     automation_dmv.swc
4.     automation_flashflexkit.swc
5.     qtp.swc



Note:-

If the Library is not added into the project Use “Add SWC” button to add the reference into the exist project to be complied. Path: - “<Installation Drive>\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs”

**<Installation Drive>= C: or D: Drive

5. Flex Compiler

1.     Right Click on the Project and Select properties.
2.     Select “Flex Complier” from the Left panel List
3.     Verify/ Add Additional Complier Arguments is set a s shown in the below 





-include-libraries "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation_agent.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\qtp.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\libs\automation_dmv.swc"
 

4.         Click the OK button to save your changes and OK to close the project Properties dialog box.

5.         Compile your Flex application.

Note:-

When the Project is Compiled/Built with all above specified settings, it helps the QTP Flex Agents to recognize the Flex Test objects and differentiate into proper Flex class 

Adobe Flash CS3


Automation of the Flash CS3 is done with help of Adobe Flex Component Kit

When Flex controls, containers, skins, and other assets is created using Flash CS3 Professional and import those assets into our Flex application, we need to include the automation_flashflexkit.swc library.

If we are using run-time loading, re-compile the runtimeloading.swf file by using the build.bat file in flex_builder_root\sdks\3.0.0\templates\automation-runtimeloading-files\. The build.bat batch file includes the necessary libraries.

Advantage 

  1. We will be able to record the actions performed on the Flex Controls.
  2. Objects are recognized based on there Standard flex classes.
  3. We will be able to retrieve the Run time value from the Controls.
  4. We will be able to use the descriptive programming for automation testing with QTP
  5. We can Replay the test scripted/ recorded on the test application.

Limitation/Disadvantages








  1. When we embed functional testing classes in our test application SWF file at compile time, the SWF file size increases.
  2. As the size of the SWF file increases then the download time of the SWF file will increase and involve some performance issue. 
  3. Due to the size issue we may require 2 SWF files. One file with functional testing classes embedded and one without for functional testing and deployment.
  4. QTP 9.1 does not support Smart Identification when working with Flex add-ins
  5. Currently Flex Add-in for QTP 9.5 does not support the Record or relay on IE 7, Fire Fox or Netscape.
  6. The object identification property will not work with Flex controls
  7. With currently downloaded version of QTP Flex Add-in only 30 actions can be performed on the test application after which licensing message box appears and will not be able to continue.

QTP Recorded Script

The below is the script Generated for the above Test flex Application. We were successfully able to perform the required actions for the test Application. The script for the same can be seen the below snapshot.
We are also able to work with the flex object with descriptive programming.


QTP Recorded Actions Performed on flex Action

                                        Link to Mandatory QTP /UFT Interview Questions to read before Interview