UFT (Unified Functional Testing) ********************************************************* Table of Contents: CH-1: Introduction to Automation

Size: px
Start display at page:

Download "UFT (Unified Functional Testing) ********************************************************* Table of Contents: CH-1: Introduction to Automation"

Transcription

1 UFT (Unified Functional Testing) ********************************************************* Table of Contents: CH-1: Introduction to Automation What is Automation Testing? Why Automation? Test Automation Tools How to Choose an Automation Tool? Which Test Cases to Automate? CH-2: Introduction to UFT Why QTP/UFT Tool? How to Install UFT? Applying Patches and Configuring Browsers QTP Tool Overview System Requirements for UFT Supported Technologies (Add-Ins) UFT Introduction UFT GUI Testing UFT API Testing Unified Functional Testing UFT Integrated Testing Business Process Testing in UFT 3. Record & Playback First QTP Script Using Record and Playback How QTP Did Record a Script? How QTP Did Play Back the Recorded Script? Different Types of Recording Normal Recording Analog Recording Low Level Recording Insight Recording How to Choose Recording Modes Running Tests CH-4: Object Identification & Object Repositories How UFT Learns Objects Object Identification Mechanism Learned Description Visual Relation Identifier Smart Identification Ordinal Identifier Object Repositories- Local, Shared Synchronization WaitProperty Exist Wait By: Noor Hossin Web: [email protected] Page: 1

2 Sync (only for web based apps) Inserting QTP Inbuilt Synchronization Points Object Spy Tool Virtual Objects Descriptive Programming (Static, Dynamic) Enhance Test Cases with Descriptive Programming Enhance Test Cases Using Dynamic Descriptive Program with User-Defined Functions 5. Checkpoints & Output Value Checkpoint Introduction Checkpoint Type Different Types of Checkpoints- Standard, Image, Bitmap, Table, Text, Textarea, Accessibility, Database, XML How to Insert a Checkpoint in a GUI Test or Component Output Values Introduction Configuring, Storing & Using Output Values CH-6: Debugging Test Script Debugging Introduction Different Types of Debugging Techniques- Break Points, Step Into, Step Over, Step Out, Debug Viewer, Watch, Console CH-7: Error Handling & Recovery Scenarios Error Handling Optional Step On Error Statement (programmatic handling of errors) Recovery Scenarios CH-8: Working with Actions Introduction to Actions Different Types of Actions- Internal, External, Reusable Creating and Calling Actions Parameterization in UFT CH-9: Working with Databases Introduction to Databases How to Connect to the Database from UFT? Creating Database Checkpoints Read/Write data from Excel sheet using UFT Data Table in QTP Working with External Databases File Handling Using UFT CH-10: Advanced Object Identification When to use Advanced Object Identification Object Identification Using - XPath, CSS, Web Table, Child Objects, HTML DOM, WebFrame Regular Expressions SendKeys Method DeviceReplay Method FireEvent Method CH-11: Frameworks By: Noor Hossin Web: [email protected] Page: 2

3 Introduction to Frameworks Benefits of Using Frameworks Different Types of Framework Implementation of Each Framework on Real Applications Batch Runner Task Scheduler CH-12: Additional Topics Automation Object Model Page Object Model Integration of QTP with ALM/QC Continuous Integration Using Jenkins Send Using MS Outlook Find the Row Where TestCase is Located Close all the Open Browsers Built In Method in UFT Get count and names of all open Browsers and Links. CH-1: Introduction to Automation Test Automation is a process in which software tools control the execution of tests and the comparison of actual outcomes with predicted outcomes before it is released into production. Why Do We Need Testing? To deliver the best application we can. To verify the functionality. To be sure that your application is always up and running. To ensure your application works on multiple devices, browsers, and operating systems. To make sure the Quality of Product. To ensure that the software does not contain any bug/errors. To check the software meets its specification/requirements What is Automation Testing? Test automation can automate some repetitive but necessary tasks in a formalized testing process already in place, or add additional testing that would be difficult to perform manually. There are many approaches to test automation; however below are the general approaches used widely: Code-Driven Testing: The public (usually) interfaces to classes, modules or libraries are tested with a variety of input arguments to validate that the results that are returned are correct. GUI (Graphical User Interface) Testing: A testing framework generates user interface events such as keystrokes and mouse clicks, and observes the changes that result in the user interface, to validate that the observable behavior of the program is correct. API (Application Programming Interface) Driven Testing: A testing framework that uses a programming interface to the application to validate the By: Noor Hossin Web: [email protected] Page: 3

4 behaviour under test. Typically API driven testing bypasses application user interface altogether. Goal of Automation is to reduce number of test cases to be run manually and not eliminate manual testing all together Why Automation? Test Each and Every Feature. Reduce Manual Effort/Saving Time. Save Money. Increasing Productivity. Reducing Human Errors. Faster Cycle/Release. Increased Test Efficiency and Software Quality. Increased Confidence. Greater Test Coverage Test Automation Tools There are hundreds of automation tools in the market. Following are the most popular test tools: QTP/UFT Selenium LoadRunner TestComplete TestDrive How to Choose an Automation Tool? Selecting the right tool can be a tricky task. Following criterion will help to select the best tool - Environment Support and Ease of Use. Testing of Database. Object identification and Object Mapping. Error Recovery Testing. Scripting Language Used. Support for various types of test - including functional, test management, mobile, etc... Support for multiple testing frameworks. Easy to debug the automation software scripts. Ability to recognize objects in any environment. Extensive test reports and results. Minimize training cost of selected tools Which Test Cases to Automate? The benefit of automated testing is correlated with how many times a given test can be repeated. Tests that are only performed a few times are better left for manual testing. Good test cases for automation are those that are run frequently and require large amounts of data to perform the same action. By: Noor Hossin Web: [email protected] Page: 4

5 Test cases to be automated can be selected using the following criterion to increase the automation ROI: High Risk - Business Critical test cases. Test cases that are executed repeatedly for multiple builds. Tests that require different set of data. Tests that run on several different hardware or software platforms and configurations. Tests that are highly subject to human error. Test cases executed with complex business logic or complex calculation. Tests that take a lot of manual effort and time. Test case Involves large amount of data. Test cases which are stable enough. Execute the routine tasks like smoke tests and regression tests. Number of iterations of the test case executions are not known. Test Cases those are very tedious or difficult to perform manually.. Automation is a bad idea when the automation objective is unclear, unrealistic or requirements and manual test cases are not stable enough. The following categories of test cases are not suitable for automation: Test Cases that are newly designed and not executed manually at least once. Test Cases for which the requirements are changing frequently. Test cases which are executed on ad-hoc basis. Common beliefs that cause automation to fail: Automation will find more bugs. ************************************************************ CH-2: Introduction to UFT Unified Functional Testing or UFT is a Functional and Regression Testing Software that test both Web and Windows Application. UFT is a licensed/commercial tool owned by HP which is one of the most popular tools available in the market. It compares the actual and expected result and reports the results in the execution summary. Make automated testing more efficient and help developers and testers collaborate. This functional automated testing software formerly Quick Test Professional (QTP) helps deliver quality software at the speed your business needs. Versions History: Astra Quick Test v1.0 to v5.5 - Mercury Interactive May 1998 to Aug : First release: Released in : Released in : Released in Quick Test Professional (QTP) 7.0: Never released 8.0: Released in : Released in : Released in : Released in Acquired and Released by HP 9.2: Released in : Released in : Released in 2009 By: Noor Hossin Web: [email protected] Page: 5

6 11.0: Released in : Released in renamed Unified Functional Testing (UFT) 11.52: Released in June : Released in November : Released March : Released July : Released March : Released July Why QTP/UFT Tool? There are hundreds of automation tools in the market. Choosing automation tool for your organization is really a difficult task. Advantages: QTP is there in Market from Long Time. Very Stable. Own Market Share. Programming Language is VBScript. Test Web based as well as Desktop Applications. HP UFT comes with built in Object Repository. Supports different environments like SAP, Oracle,.NET. Integrates with test management tool like HP Quality Center. Disadvantages: Cost/Money (QTP is licensed product). Install on Windows. VBScript (Non object oriented language) How to Install UFT? Go to Download and Install Free Trial for 30 Days. Latest Version: Installation: different places it stores the traces Use Virtual Tools: VMWare, Parallels Then Uninstall and Reinstall How much does QTP cost? -- 8k-12k USD/Year Two License Types in UFT: 1. Seat License: License only for your specific machine. Seat License: 6k 2. Concurrent License: First Come First Serve. Concurrent License: 8k Seat License A Seat License is specific to the computer in which it is installed. This license includes a 30-day demo period during which you must contact HP to obtain a permanent seat license key. Concurrent License A Concurrent License regulates the number of concurrent Unified Functional Testing users and requires installation of a license server from a separate CD-ROM found in the Unified Functional Testing package. You purchase Concurrent Licenses separately from HP, and install them on the HP Functional Testing Concurrent License Server. By: Noor Hossin Web: [email protected] Page: 6

7 2.3 - Applying Patches and Configuring Browsers Supported Languages HP QuickTest Professional uses VBScript as its scripting language. This is the only language that is fully supported by QTP IDE. VBScript supports Object Oriented Programming concepts but not polymorphism and inheritance. OS and Browser Support UFT officially supports Windows 8.1 and supports Windows Server 2012 R2 (at technology preview level) Support for Safari on Mac is now out of Technology Preview. UFT can now officially perform testing on Safari browsers (running on Mac OS) including: Running tests on Safari browsers running on a remote Mac computer. Remotely spy on Safari browser objects and take snapshots during test runs. Using a secure communication channel between the UFT computer and the Mac computer. Browser versions supported by UFT are IE v8 v11 (including extended protected mode), Firefox till v31, Chrome till v36 and Safari (on Mac) v6, v6.10, v7.00. Check if Browsers are Identified by QTP 1. Launch browser after launching QTP Tool. 2. Browser Version we are using is in supported list. Note: Downgrade the browsers to the supported version ( Installing browser, make sure that auto update is turned off. For serial key use serials.ws 3. Enable the QTP extension/addon on the browser UFT Tool Overview Unified Functional Testing Unified Functional Testing was released in Dec The combo of QuickTest Pro (QTP) + Service Test (ST) is now integrated into Unified Functional Testing (UFT). The major new features introduced in this version were: HP UFT Insight. Multiple Script Debugging. PDF Checkpoints. Support Open Source CI Systems. Mobile Testing Support. Unified Functional Testing A service pack UFT_00001.exe was released in Feb 2013 which has changed the version of UFT from UFT to UFT This patch has various bug fixes and minor enhancements. It has an added support for Windows 8 and IE 10. By: Noor Hossin Web: [email protected] Page: 7

8 Mozilla Firefox version 19 is now supported with a patch UFT_00037.EXE. Unified Functional Testing A service pack UFT_00022.EXE was released in June 2013 which has changed the version of UFT from UFT to UFT (This service pack can be installed directly on top of 11.50; you don t need UFT if you have not installed it earlier) This patch has various bug fixes and minor enhancements. With this patch, UFT now fully supports.xlsx format. HP is keeping pace with Firefox. It has added support for Firefox 21 in this pack. A new method was added for Insight objects: ClickSpecial. New versions are supported for SAP CRM, WDA, and SAP Portal. New support for numerous SAP Web Dynpro ABAP controls. Unified Functional Testing A service pack UFT_00044.EXE was released in December 2013 which has changed the version of UFT from UFT to UFT (This service pack can be installed directly on top of 11.50; you don t need UFT or if you have not installed them earlier) This Service Pack addresses quality and performance issues found in the Major releases and its previous service packs, SP 1 & SP 2. This service pack is a mandatory update for all UFT 11.50/11.51/11.52 and Service Test 11.50/11.51/11.52 users. Unified Functional Testing 12 UFT 12 was released in March The major new features introduced in UFT 12 were: Better, Faster installer. Better ALM authentication. Auto Upload of run results to ALM. Introducing support to test Safari browser on a remote Mac (in technology preview mode). Support for more technologies. Unified Functional Testing UFT was released in July The major new features introduced in UFT were: Official support for Windows 8.1. Support for Safari on Mac OS is now out of Tech Preview and available for production environment. Chrome extension for UFT is available in Chrome Store from now on. Better documentation. Support for windows runtime objects. Unified Functional Testing 12.5 UFT 12.5 was released in July The major new features are: By: Noor Hossin Web: [email protected] Page: 8

9 LeanFT A brand new powerful tool which can compliment your testing with UFT. Version control with Git. Running UFT test without the full IDE using Run Time Engine. Enhanced support for cross browser testing. Migration of UFT licensing mechanism from Sentinel to AutoPass. UFT 12.5 is the latest version available in the market as of August To learn more check Version History of UFT System Requirements for UFT To successfully install and run HP QuickTest Professional 12.02, your computer must meet the minimum system requirements shown below. However, It is always recommended to have a configuration higher than the minimum requirements. Computer/Processor: Pentium IV or higher microprocessor (minimum 1 Ghz) Operating System: Windows XP Service Pack 3, Windows Vista, Windows 7 and Windows 8/8.1 (with a patch) Memory: Minimum of 1GB when no more than three add-ins are loaded simultaneously. [Additional memory is required when loading more add-ins and when using the Save movie to results option to capture movies during run sessions.] Color Settings: High Color (16 bit) Graphics Card: Graphics card with 64MB video memory Free Hard Disk Space: 1 GB of free disk space for application files and folders. [You must also have an additional 120 MB of free disk space on the system disk (the disk on which the operating system is installed).] Supported Technologies (Add-Ins) QTP can be used to automate web based and windows based client-server applications. However, it doesn t support all technologies by default. For an extended support, we need to load the corresponding add in. For instance, if you were to automate an application based on Java technology, you will have to load Java add in. [QTP Add-Ins is software provided by HP that needs to be installed on a machine where QTP is installed to support a corresponding technology.] Quick Test Professional comes with 3 add-ins by default ActiveX, Visual Basic and Web. All-in-all QTP supports:.net, Web, VB, Mobile, Java, Oracle apps, SAP, PeopleSoft, Siebel, Stingray, Terminal Emulators (Unix, Mainframes), Power Builder, Delphi, Visual Age, Web Services, Flex (By Adobe), Shunra VE Desktop Professional for WAN emulation (By Shunra). Mobile Add-on for UFT The add-on enables to use UFT only (as a standalone tool) for mobile testing. You can now test on real mobile devices using UFT; the same way you use it to test web or desktop applications: Use UFT recorder. By: Noor Hossin Web: [email protected] Page: 9

10 Use UFT object Spy. Use UFT command auto-completion. Receive the reports in UFT reporting tab Inc screenshots what happened on the device. Test on local or remote (Cloud) devices. Supports ios, Android, WindowsPhone and Blackberry devices. Support Web and Native recognition. Support QTP 11,11.5 and UFT 12,12.5 Download Link: UFT Introduction 1. UFT GUI Testing 2. UFT API Testing 3. Unified Functional Testing 4. UFT Integrated Testing 5. Business Process Testing (BPT) in UFT UFT GUI Testing Graphical User Interface or GUI testing is the process of ensuring proper functionality of the graphical user interface (GUI) for a given application and making sure it conforms to its written specifications. GUI testing involves checking the screens with the controls like menus, buttons, icons, and all types of bars - toolbar, menu bar, dialog boxes and windows etc. UFT API Testing UFT's API (service) testing solution provides tools for the construction and execution of functional tests for headless (GUI-less) systems. For example, you can use UFT to test standard Web Services, non-soap Web Services, such as REST, and so on. You create an API test by dragging and dropping activities from the UFT Toolbox pane into the test, displayed in the canvas. The toolbox provides a collection of activities for functional testing in areas such as REST, Web Services, JMS, and HTTP. You can add more activities to the toolbox by importing WSDLs or providing other contract definitions. Unified Functional Testing UFT's combined solution for GUI and API (service) testing enables you to test functionality across multiple application layers, such as the front-end GUI layer as well as back-end service layers. Additionally, the integrated BPT features enable a wider range of both technical and non-technical UFT users, maximizing your opportunity to create comprehensive automated tests. UFT helps you to cut time-to-market by starting automated functional testing earlier in your process. You can also streamline your tools, cutting costs on both training and licenses. UFT Integrated Testing Integration for GUI and API Testing By: Noor Hossin Web: [email protected] Page: 10

11 You can integrate your GUI and service testing processes in a single test by including calls from your GUI test to API tests, or from your API tests to GUI tests. When you insert a call to another test, the call is displayed as nested under the relevant action in the canvas. You insert and modify calls to API tests from GUI tests using the Call to API Test/Action Dialog Box. You insert and modify calls to GUI tests from API tests by dragging the Call GUI Action or Test onto the canvas from the HP Automated Testing Tools node in the Toolbox pane. For more details, see How to Call External Tests or Actions. Integration with ALM You can also use UFT together with ALM - the HP centralized quality solution - to manage the entire testing process. For example, you can use ALM to: Create a project (central repository) of manual and automated tests. Build test cycles. Run tests. Report and track defects. You can also create reports and graphs to help you review the progress of test planning, runs, and defect tracking before a software release. Tests and components created in UFT can be saved directly to your ALM project, and you can run UFT tests and review and manage the results in ALM. Business Process Testing in UFT Business Process Testing (BPT) works within UFT or ALM as a component-based testing framework. Working with a testing framework provides many advantages to enterprises, including streamlining the creation and maintenance of both manual and automated tests, and maximizing efficiency for testing complete business processes. Business Components: Enable structured automated testing. Reduce the duplication of effort when combining manual tests with automatic tests. Enable component reusability to speed-up the automation process. Provide the ability to pass parameters from one step to another within your business process. You can save the output of a step to a parameter and use it as an input value for subsequent steps. Simplify on-going test maintenance. Minimizes time-to-test. Business Process Testing in UFT describes how to use BPT in UFT, including how to maintain business process tests and flows, business components, and application areas in UFT. By: Noor Hossin Web: [email protected] Page: 11

12 CH-3: Record & Playback Record and Playback are used to record the user actions in the form of scripts and Play them back at a later time by running the script. Using record option QTP users can build automation scripts automatically without having any knowledge of scripting First QTP Script Using Record and Playback How QTP did Record a Script? Starting from the moment when Record button is clicked till the moment stop button is clicked QTP as a record all the user actions as you navigate through your website or application and generates a script. User actions can be seen in the script as steps. A step is anything that user does that changes the content of a page or object in your application, like for example clicking a link or typing data in an edit box. Steps for Record and Playback are as follows: Step 1: Click on "New" test from the Start Page Step 2: Upon Clicking, "New" Link, the new test window opens and the user need to select the test type. Select "GUI Test", give a name for the test and also the location where it needs to be saved. Step 3: Once a New test is created, the new test screen opens. Now, click on "Action1" Tab which is created with 1 action by default. Step 4: Click on "Record" Menu and select "Record and Run Settings". Step 5: The Record and Run Settings Dialog opens and based on the type of application, one can select i.e. Web, Java, Windows Applications. Record & Run settings shows a tabs corresponding to add-ins installed and loaded for your test. For example if you have SAP Add-in Installed and loaded you will see a SAP tab. The Windows Application tab is always available and is used for environments, such as Visual Basic, ActiveX, and terminal emulators. For any Environment, the Record and Run settings can be classified into two generic groups: 1. Record & Run Test on ANY Open Browser belonging to that particular environment. 2. Record & Run on a SPECIFIC window belonging to that particular environment - which is the recommended Option. Let's stick to default settings. QTP remembers and uses the same settings for additional record sessions on the same test, unless you manually open the Record and Run Settings dialog box to modify the settings. For Example, We will record a Web Based Application Put this on address box. Step 6: Click Record Button, the Internet Explorer opens automatically with the web address as per the settings. Click "VBScript" link under "UFT" and then click "Continue Reading " link under Conditional Statement. Click on ALM at the right of Conditional Statement page. Upon completion of the action By: Noor Hossin Web: [email protected] Page: 12

13 click "Stop" button in the record panel. You will notice that the script is generated as shown below: Browser("QA Engineering And Web").Page("QA Engineering And Web").Link("Continue Reading ").Click Browser("QA Engineering And Web").Page("Different Types of Checkpoints").Link("UFT").Click Browser("QA Engineering And Web").Page("UFT NH-TECH").Link("Continue Reading ").Click Browser("QA Engineering And Web").Page("Different Types of Recording").Sync Browser("QA Engineering And Web").CloseAllTabs How QTP Did Play Back the Recorded Script? Step 7: Now playback the script by clicking on the playback button. The Script replays and result is displayed. Step 8: The result window is opened by default which exactly shows the timestamp of execution, passes and failed steps Different Types of Recording Recording Modes: There are four recording modes in UFT. 1. Normal Recording 2. Analog Recording 3. Low Level Recording 4. Insight Recording (1) Normal Recording Mode: It records the actions performed by the user on the application objects like Edit boxes, List boxes and Links. UFT records each action as one step in the UFT script. Step is nothing but one line in the code. The Default recording mode is the Normal Recording Mode. Normal Recording Script: Browser("QA Engineering And Web").Page("QA Engineering And Web").Link("ALM").Click Browser("QA Engineering And Web").Page("ALM NH-TECH").Link("About").Click Browser("QA Engineering And Web").Page("About Me").Sync Browser("QA Engineering And Web").CloseAllTabs (2) Analog Recording Mode: This mode enables you to record the exact mouse and keyboard operations you perform in relation to either the screen or the application window. This mode is useful when you want to record mouse movements, for example recording a signature or drawing performed by dragging the mouse. To record in analog mode, first start normal recording then select Recording Mode > Analog Recording. The Analog recording dialog box opens up. Record relative to the screen: QTP records any mouse movement or keyboard input relative to the top left coordinates of your screen (i.e. desktop). Record relative to the following window: QTP records any mouse movement or keyboard input relative to the coordinates of the specified window. Analog Recording Script: Desktop.RunAnalog "Track1" By: Noor Hossin Web: [email protected] Page: 13

14 (3) Low Level Recording: Low level recording mode is used only when exact coordinate of the operation is essential. To record a test using low level recording mode, start the normal recording session then select Recording Mode > Low Level Recording to start recording in low level. Low Level Recording Script: Window("Internet Explorer").WinObject("Internet Explorer_Server").Click 971,170 Window("Internet Explorer").WinObject("Internet Explorer_Server").Click 269,434 Window("Internet Explorer").WinObject("Internet Explorer_Server").Click 704,368 Window("Internet Explorer").WinObject("Internet Explorer_Server").Click 840,396 (4) Insight Recording: UFT records operation based on its appearance and NOT based on its native properties. Insight Recording Script: Browser("QA Engineering And Web").InsightObject("InsightObject").Click Browser("QA Engineering And Web").InsightObject("InsightObject_2").Click Browser("QA Engineering And Web").InsightObject("InsightObject_3").Click How to Choose Recording Modes Upon clicking on recording button, user can choose the recording mode from the recording pane that appears on the screen once recording starts. The selection can be made from any ones. Guidelines for Choosing the Recording Mode: Use Analog recording mode only when normal recording mode does not accurately record your operations. Use analog recording for the applications in which the actual movement of the mouse is what you want to record, like drawings, signatures etc. Use low level recording when you need to record the exact location of the operation on your application screen Running Tests QTP always run from the first step, unless you specify. To run a test, open it and select Run > Run or press F5. The Run dialog box opens, in the dialog box specify the result location. Temporary run result folder saves run results in a temporary folder. This option overwrites any results previously saved in this folder. Click OK to start the Run session. Test Result Window: By: Noor Hossin Web: [email protected] Page: 14

15 When a run session ends, you can view run session results in the Test Results window. The run result tree is located in the left pane in the Test Result window. ************************************************************ CH-4: Object Identification & Object Repositories UFT tests your dynamically changing application by learning and identifying test objects and their expected properties and values. To do this, UFT analyzes each object in your application in much the same way that a person would look at a photograph and remember its details How UFT Learns Objects Every test automation tool has to identify the objects on the application, and then only it can do the intended operations. UFT uses the same method how Human's Identify the Object for object identification. During Record Time UFT tries to learn properties of a GUI object on which operation is performed. During Run-Time UFT compares the stored object properties with actual properties of object available on screen and uniquely identifies an object independent of its location on screen. The stored object and its associated properties called TEST Object. During Runtime, the actual object available on the application under test is called UFT Run-Time Object. Information about the Test Objects is stored in Object Repository. Object Identification Dialogue Box: Tools > Object Identification UFT considers the identification properties for the test object. For each test object class, UFT has a list of mandatory properties that it always learns; similar to the list of characteristics. When UFT learns an object, it always learns these default property values, and then "looks" at the rest of the objects on the page, dialog box, or other parent object to check whether this description is enough to uniquely identify the object. If not, UFT adds assistive properties, one by one, to the description, until it has compiled a unique description. If no assistive properties are available, or if those available are not sufficient to create a unique description, UFT adds a special ordinal identifier, such as the object's location on the page or in the source code, to create a unique description Object Identification Mechanism UFT stores Object and its properties in Object Repository to identify them during runtime. An Object could have large number of properties associated with it. By default UFT does not store all the properties of an object. It stores a limited number of typical properties for an object which helps in its unique identification. This choice of properties for various environments and objects is stored in Object Identification. How UFT Identifies Objects During a Run Session: UFT has four types of Object Identification Mechanism as follows: By: Noor Hossin Web: [email protected] Page: 15

16 1. Learned Description 2. Visual Relation Identifier 3. Smart Identification 4. Ordinal Identifier (1) Learned Description When UFT learns an object, it learns a set of properties and values that uniquely describe the object within the object hierarchy. In most cases, this description is sufficient to enable UFT to identify the object during the run session. The Learned Description mechanism uses two types of properties: 1. Mandatory Properties - Mandatory properties are properties that UFT always learns for a particular test object class. UFT has a predefined set of properties that it learns for each test object. If these mandatory property values are not sufficient to uniquely identify a learned object, UFT can add some assistive properties and/or an ordinal identifier to create a unique description. 2. Assistive Properties - Assistive properties are properties that UFT learns only if the mandatory properties that UFT learns for a particular object in your application are not sufficient to create a unique description. If several assistive properties are defined for an object class, then UFT learns one assistive property at a time and stops as soon as it creates a unique description for the object. If UFT does learn assistive properties, those properties are added to the test object description. (2) Visual Relation Identifier Visual Relation Identifier which enables UFT to identify test objects according to their neighboring objects in the application. You use this property to link less stable test objects to more unique test objects, and as long as those objects in the application maintain their relative location to your object, UFT should still be able to identify the test object even after predictable user interface changes in the application. You define visual relations in the Visual Relation Identifier Dialog Box, which is accessible from the local or shared object repository, or from the Object Properties Dialog Box. How UFT Uses Visual Relation Identifiers: Visual Relation Identifiers compares the relative locations of the test objects you defined in the visual relation identifier with the multiple identical objects. During a run session, UFT first attempts to identify the test object using the object's description properties. If UFT finds one or more objects matching the test object's description, it attempts to identify the object using the visual relation identifier. After the visual relation identifier is applied, if no objects or more than one object is found, the visual relation identifier fails, and UFT continues to Smart Identification (when defined for that test object class). After Smart Identification is applied, if no objects or more than one object is found, no ordinal identifiers are used for that test object. (3) Smart Identification By: Noor Hossin Web: [email protected] Page: 16

17 Smart Identification mechanism to identify an object, even when the learned description is no longer accurate. Even if the values of your identification properties change, UFT maintains the reusability of your test or component by identifying the object using Smart Identification. If UFT is unable to find any object that matches the learned object description, or if it finds more than one object that fits the description, then UFT ignores the learned description, and uses the Smart Identification mechanism (if defined and enabled) to try to identify the object. The Smart Identification Properties Dialog Box enables you to create and modify the Smart Identification definition that UFT uses for a selected test object class. Configuring Smart Identification properties enables you to help UFT identify objects in your application, even if some of the properties in the object's learned description have changed. The Smart Identification mechanism uses two types of properties: 1. Base Filter Properties the most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link s tag was changed from {A} to any other value, you could no longer call it the same object. 2. Optional Filter Properties other properties that can help identify objects of a particular class. These properties are unlikely to change on a regular basis, but can be ignored if they are no longer applicable. (4) Ordinal Identifier The ordinal identifier assigns the object a numerical value that indicates its order relative to other objects with an otherwise identical description (objects that have the same values for all properties specified in the mandatory and assistive property lists). This ordered value enables UFT to create a unique description when the mandatory and assistive properties are not sufficient to do so. In addition, even if UFT learns an ordinal identifier, it will use the identifier during the run session only if: The learned description and the Smart Identification mechanism are not sufficient to identify the object in your application. A visual relation identifier is not defined for the test object. UFT can use the following types of ordinal identifiers to identify an object: 1. Index - Indicates the order in which the object appears in the application code relative to other objects with an otherwise identical description. 2. Location - Indicates the order in which the object appears within the parent window, frame, or dialog box relative to other objects with an otherwise identical description. 3. CreationTime (Browser object only) - Indicates the order in which the browser was opened relative to other open browsers with an otherwise identical description. By: Noor Hossin Web: [email protected] Page: 17

18 By default, an ordinal identifier type exists for each test object class. To modify the default ordinal identifier, you can select the desired type from the Ordinal identifier box. Object Identification Process Workflow: The following flowchart provides a general overview of the main process of UFT object identification. Fig: Object Identification Process Workflow How UFT Applies the Test Object Model Concept A Test Object is an object that UFT creates in a test or component to represent the actual object in your application. UFT stores information on the object that will help it identify and check the object during the run session. A Run-Time object is the actual object in your application on which methods are performed during the run session. When UFT learns an object in your application, it adds the corresponding test object to an object repository, which is a storehouse for objects. When you add an object to an object repository, UFT: Identifies the UFT test object class that represents the learned object and creates the appropriate test object. By: Noor Hossin Web: [email protected] Page: 18

19 Reads the current value of the object's properties in your application and stores the list of identification properties and values with the test object. Chooses a unique name for the test object, generally using the value of one of its prominent properties. Example: Suppose you add a Search button with the HTML source code, <INPUT TYPE="submit" NAME="Search" VALUE="Search"> UFT identifies the object as a WebButton test object. In the object repository, UFT creates a WebButton object with the name Search, learns a set of identification properties for the object. For example, UFT records that you performed a Click method on the WebButton. In an action UFT displays your step in the Editor like this: Browser("Search Results: Search").Page("Search Results: Search").WebButton("Search").Click Test Object Descriptions For each test object class, UFT learns a set of identification properties when it learns an object, and selects a subset of these properties to serve as a unique Object Description. UFT then uses this description to identify the object when it runs a test or component. When the test or component runs, UFT searches for the object that matches the description it learned. If it cannot find any object that matches the description, or if it finds more than one object that matches, UFT may use the Smart Identification mechanism to identify the object. You can configure the mandatory, assistive, and ordinal identifier properties that UFT uses to learn the descriptions of the objects in your application, and you can enable and configure the Smart Identification mechanism. UFT Test Object Hierarchy The UFT test object hierarchy comprises one or more levels of test objects. The top level object may represent a window, dialog box, or browser type object, depending on the environment. The actual object on which you perform an operation may be learned as a top level object, a second level object, for example, Window.WinToolbar, or a third level object, for example, Browser().Page().WebButton(). In some cases, even though the object in your application may be embedded in several levels of objects, the hierarchy does not include these objects. For example, if a WebButton object in your application is actually contained in several nested WebTable objects, which are all contained within a Browser and Page, the learned object hierarchy is only Browser.Page.WebButton. An object that can potentially contain a lower-level object is called a Container Object. All top-level objects in the object hierarchy are container objects. If a second-level object contains third-level objects according to the UFT object hierarchy, then that object is also considered a container object. For example, in the step Browser.Page.Edit.Set "Noor", Browser and Page are both container objects Object Repositories - Local, Shared Object Repository is a collection of object and properties with which QTP will be able to recognize the objects and act on it. When a user records a test, the objects By: Noor Hossin Web: [email protected] Page: 19

20 and its properties are captured by default. Without understanding objects and its properties, QTP will NOT be able to play back the scripts. The Object Repository window displays a tree of all test objects, and all checkpoint and output objects in the current action or component, including all local objects and all objects in associated shared object repositories. For each object you select in the tree, the Object Repository window displays information on the object, including its type, the repository in which it is stored, and its object details. Local objects are editable (black); shared objects are read-only (gray). You can continue using UFT while the Object Repository window is open, including modifying objects and object repositories. The Object Repository window reflects changes you make to it in real time. UFT has two types of Object Repositories for storing object information: 1. Local Object Repository 2. Shared Object Repository Local Object Repository Local Object Repository stores objects information in a file that is associated with one specific action, so that only that action can access the stored objects. Resources > Object Repository Local Object Repository is the default object repository. It is specific to actions and can be used only for a particular action. Local Object Repository is preferable when application is not dynamic with respect to time. Local Object Repository cannot be reused. You can perform many operations in the local object repository such as - Highlight an object stored in repository on the application under test. Check whether a particular object in your AUT is stored in the Object Repository. Cut, Copy, Paste, Modify and Delete Objects. In case you have accidentally modified the value of a property you can update its description from the application using update function. Shared Object Repository A shared object repository stores objects in a file that can be accessed by multiple tests (in read-only mode). Resources > Object Repository Manager A shared object repository contains information that enables UFT to identify the objects in your application. When objects in your application change, the Object Repository Manager provides a single, central location in which you can update test object information for multiple tests or components. Advantages of Shared Object Repositories Use the same shared object repository with multiple actions or components. Use multiple shared object repositories with each action or component. By: Noor Hossin Web: [email protected] Page: 20

21 If shared object repositories are stored in ALM, can apply version control to them. Creating, Opening, Modifying, and Saving Shared Object Repositories Creating a Shared Object Repository - To create a Shared Object Repository, in the Object Repository Dialog Box: Resources > Object Repository Manager Object Repository Manager > New Then click on Add Objects. Mouse pointer gets turned to hand symbol and then click the object to be added. Added objects are displayed in a tree structure. Shared Object Repository files save an extension.tsr (Test Script Repository). Enabling Editing - If you opened the shared object repository in read-only mode, you must enable editing for the shared object repository before you can modify it. This locks the shared object repository and prevents it from being modified simultaneously by multiple users. Unlocking - To enable other users to modify the shared object repository, you must first unlock it (by disabling edit mode, or by closing it). If a shared object repository is already locked by another user, if it is saved in read-only format, or if you do not have the permissions required to open it, you cannot enable editing for it. Applying Changes - All changes you make to a shared object repository are automatically updated in all tests or components open on the same computer that use the shared object repository as soon as you make the change even if you have not yet saved the shared object repository with your changes. If you close the shared object repository without saving your changes, the changes are rolled back in any open tests or components that were open at the time. Updating Changes - When you open a test or component on the same computer on which you modified the shared object repository, the test or component is automatically updated with all saved changes made in the associated shared object repository. To see saved changes in a test or component or repository open on a different computer, you must open the test or component or shared object repository file or lock it for editing on your computer to load the changes. Merging - You can modify a shared object repository by merging it with another shared object repository. When you merge two shared object repositories, a new shared object repository is created, containing the content of both shared object repositories. If you merge a shared object repository with a local object repository, the shared object repository is updated with the content of the local object repository. Example: 'Using FireEvent Logout from amazon.com RepositoriesCollection.Add "E:\SQA\Docs\Unified Functional Testing\Repository\pom.tsr" SystemUtil.Run "iexplore.exe"," Browser("Amazon.com: Online Shopping").Page("Amazon.com: Online Shopping").WebElement("Sign in").fireevent "onmouseover" Browser("Amazon.com: Online Shopping").Page("Amazon.com: Online Shopping").Link("Sign in").click By: Noor Hossin Web: [email protected] Page: 21

22 Browser("Amazon.com: Online Shopping").Page("Amazon.com Sign In").WebEdit(" ").Set Browser("Amazon.com: Online Shopping").Page("Amazon.com Sign In").WebEdit("password").Set "abcd123" Browser("Amazon.com: Online Shopping").Page("Amazon.com Sign In").WebButton("Sign in using our secure").click Browser("Amazon.com: Online Shopping").Page("Amazon.com: Online Shopping").WebElement("Sign in").fireevent "onmouseover" Browser("Amazon.com: Online Shopping").Page("Amazon.com: Recommended").Link("Not Noor? Sign Out").Click Importing and Exporting Shared Object Repositories Using XML You can import and export shared object repositories from and to XML files. XML provides a structured, accessible format that enables you to make changes to shared object repositories using the XML editor of your choice and then import them back into UFT. You can import and export object repositories from and to XML files. You import and export the files using the File > Import from XML and File > Export to XML options in the Object Repository Manager. XML provides a structured, accessible format that enables you to make changes to object repositories using the XML editor of your choice and then import them back into UFT. UFT uses a defined XML schema for object repositories (ObjectRepository.xsd), which is located in the <UFT installation folder>\dat folder. This document describes each of the elements and complex types defined for the object repository schema. You must follow this schema when creating or modifying object repository files in XML format. You can import and export files from and to the file system or an ALM project (if UFT is connected to ALM). Creating Scripts without Object Repository To create scripts without Object Repository you can use: Descriptive Programming Xpath CSS Path HTML DOM Synchronization Synchronization makes available specified amount of time for an object to process prior to moving on to the next step. Synchronization point is the time interface between Tool and Application under test. Synchronization point is to give waiting time to the tool before executing next step in Test script. Different Way of Synchronization in UFT: Sometimes the application we are automating is very slow, and UFT may run very fast. Now how can we synchronize the application with UFT. Following are the five methods to synchronize the application with UFT. By: Noor Hossin Web: [email protected] Page: 22

23 1. WaitProperty 2. Exist 3. Wait 4. Sync (only for web based apps) 5. Inserting QTP Inbuilt Synchronization Points METHOD 1: WAITPROPERTY WaitProperty is a method that takes the property name, Value and Timeout value as input to perform the sync. It is a dynamic wait and hence this option is encouraged. ' Method 1 - WaitProperty with 25 seconds Dim obj Set obj = Browser("Math Calculator").Page("Math Calculator") obj.link("numbers").click obj.link("simple Interest").WaitProperty "text", "Simple Interest",25000 obj.link("simple Interest").Click METHOD 2: EXIST Exist is a method that takes the Timeout value as input to perform the sync. Again it is a dynamic wait and hence this option is encouraged. ' Method 2 : Exist Timeout - 30 Seconds If (Browser(":: PeopleNTech, LLC. ::").Page("- Index").WebElement("Logout").Exist) Then ws.cells(2,"e")="passed" else ws.cells(2,"e")="failed" End If METHOD 3: WAIT Wait is a hardcoded sync point which waits independent of the event happened or NOT. Hence usage of Wait is discouraged and can be used for shorter wait time such as 1 or 2 seconds. ' Method 3 : Wait Timeout - 30 Seconds SystemUtil.Run "iexplore.exe"," Browser("title:=.*").page("title:=.*").webedit("html tag:=input","name:=user","type:=text").set "training1" Wait 2 Browser("title:=.*").page("title:=.*").webedit("html tag:=input","name:=passwrd","type:=password").set "abcd1234" Wait 2 Browser("title:=.*").page("title:=.*").webbutton("html tag:=input","name:=login","type:=submit").click Wait 10 Browser("title:=.*").page("title:=.*").Link("html tag:=a","text:=logout").click Browser("title:=.*").Close METHOD 4: SYNC Sync Method can be used only for web applications where there is always a lag between page loads. ' Method 4 : Dim obj Set obj = Browser("Math Calculator").Page("Math Calculator") obj.link("numbers").click Browser("Math Calculator").Sync Browser("Math Calculator").Page("Math Calculator").Link("Simple Interest").Click By: Noor Hossin Web: [email protected] Page: 23

24 METHOD 5: INSERTING QTP INBUILT SYNCHRONIZATION POINTS Step 1: Get into Recording Mode. This Option Would is disabled if the user is NOT in Recording Mode. Step 2: Goto Design > Synchronization Point Step 3: We need to select the object which we want to be the Sync Point. After selecting the object, object window opens as shown below: Step 4: Click Ok, the "Add Synchronization Window" Opens up. Select the Property, Value and Time out value and click ok as shown below: Step 5: The Script would be generated as shown below which is the same as that of the WaitProperty(Method 1) that we had already discussed: Browser("Math Calculator").Page("Math Calculator").Link("Numbers").Click Browser("Math Calculator").Page("Math Calculator").Link("Simple Interest").WaitProperty "text", "Simple Interest", Default Synchronization: When user hasn't used any of the above sync methods, still QTP has in built Object synchronization timeout which can be adjusted by the user. Object Synchronization Timeout: Sets the maximum time (in seconds) that UFT waits for an object to load before running a step in the test. When Object is not existing UFT wait for some time is called Object Synchronization Timeout. By default it is 20 secs. It can be modified by: File > Settings > Run > Object synchronization timeout: Object Spy Tool Object Spy Tool helps to learn the objects in the application under test (AUT). By simple click on the object, Object Spy displays Properties and Operations of Native and Identification objects. Object Spy Dialog Box: Tools > Object Spy First, activate the AUT window which has the objects to learn. Then click on hand icon in the Object Spy window as shown below. Your mouse pointer turns into hand icon. Simply click on the object that you want to learn. Object Spy window displays its properties and methods as shown below. Fig: Object Spy Dialog Box By: Noor Hossin Web: [email protected] Page: 24

25 This dialog box enables you to view the native properties and operations of any object in an open application, as well as the test object hierarchy, identification properties, and operations of the test object that UFT uses to represent that object. You can also check if an object is in a repository associated with your action or component (via its application area), add the selected object to the local object repository (or a shared object repository if you are using the Object Spy from the Object Repository Manager), and highlight an object in the application. After Spying the Object: After spying the object, the object hierarchy will be shown. Let us say, we are spying the "Numbers" link. The Object properties will be as shown below. Highlight Object: After spying an object, we can click on "Highlight" option to highlight the object in the application. Add Objects: For adding the object into the Object Repository, one should click on "Add objects" button in the Object spy dialog. Properties and Values: The properties and its values are displayed for the selected object in the dialog box which should be Unique for QTP to recognize the objects while the script executes. Operations: The supported operations on the object can be retrieved by clicking on the operation tab. Operations such as "click" for a button, "Set" for a text box are retrieved from the "operations" tab. Advantages of Object Spy 1. It will give the complete hierarchy of an Object. 2. It will give the Native and Identification properties and its values. 3. It will give the Operations/Methods of an Object. If UFT is NOT Identifying the Object Properly You should open the AUT only after opening QTP. By: Noor Hossin Web: [email protected] Page: 25

26 Make sure your Browser zoom settings are set to 100%. Make sure all the appropriate Add-in are added. In your IE Browser open Internet Options > Security and uncheck Enable Protected Mode checkbox. For Windows 7 Users, type UAC in the Control Panel search box and open User Account Control Settings. Change the Setting level to Never Notify and restart the system Virtual Objects Application under any test may contain standard window object but may NOT recognized by UFT. At this situation objects can be identified as Virtual Object (VO) type button, link etc so that user actions can be simulated on the virtual objects during execution. How Virtual Objects are Defined and Recognized UFT identifies a virtual object according to its boundaries. Marking an object's boundaries specifies its size and position on a Web page or application window. When you assign a test object as the parent of your virtual object, you specify that the coordinates of the virtual object boundaries are relative to that parent object. When you record a test or scripted component, UFT recognizes the virtual object within the parent object and adds it as a test object in the object repository so that UFT can identify the object during the run session. UFT also recognizes the virtual object as a test object when you add it manually to the object repository. To perform an operation in the Active Screen on a marked virtual object, you must first record it, so that its properties are saved in the test object description in the object repository. If you perform an operation in the Active Screen on a virtual object that has not yet been recorded, UFT treats it as a standard object. You can use virtual objects only when recording and running a test or scripted component. You cannot insert any type of checkpoint on a virtual object, or use the Object Spy to view its properties. You can enable and disable recognition of virtual objects during recording, in the General pane of the GUI Testing tab in the Options dialog box (Tools > Options > GUI Testing tab > General node). During a run session, make sure that the application window is the same size and in the same location as it was during recording, otherwise the coordinates of the virtual object relative to its parent object may be different, and this may affect the success of the run session. Creating a Virtual Object Step 1: In such scenarios, virtual Objects are created using Virtual Object Manager or New Virtual Object. Tools > Virtual Object > New Virtual Object Click "Next" Button. Step 2: Map the Object against the Class Type and click "Next". Step 3: Click "Mark Object" Button, cross hair cursor would appear and mark the object that you would like to map and click "Next". Step 4: Selecting the parent of the Virtual object and click "Next". By: Noor Hossin Web: [email protected] Page: 26

27 Step 5: Name the collection in which you would like to store the virtual object and click "Finish". Virtual Object Manager Virtual object Manager manages the collections of Virtual objects. Testers can add or Delete the Virtual Objects from the Navigation to Virtual object Manager. Tools > Virtual Object Manager Using Virtual Objects: After creating the Virtual Objects the created object can be used as shown below: Window("Microsoft Word").WinObject("Ribbon").VirtualButton("button").Click Limitations of Virtual Object QTP doesn't support virtual objects for analog or low-level recording. Checkpoints cannot be added on Virtual Objects. Virtual Object is NOT controlled by Object Repository. Though we map an object to a particular class (button or List), all the methods of the native objects are not supported by Virtual objects. Object Spy cannot be used on Virtual Object. The test execution will fail if the screen resolution changes as the co-ordinates change. Application Window should be of same screen size so that Virtual objects are captured correctly Descriptive Programming (Static, Dynamic) Descriptive Programming (also known as Programmatic Description) provides a way to perform operations on objects that are not present in object repository. In simple words, Descriptive Programming is the type of programming where you DON T use Object Repository while writing your test scripts. Manually specifying the properties and values using Object Spy tool by which the relevant object will be identified. When to Uses of Descriptive Programming? Dynamic Object Property - When the object properties in the Application Under Test (AUT) are very dynamic in nature and need special handling to identify the object. External Function Library - When you are creating functions in an external file. Huge Object Repository - When the Object Repository grows big, it results in poor Performance as the size of the Object Repository increases. Object Repository in Run Time - When the application under Test is having objects that are adding in the Run Time. Not to Use Object Repository - When the framework is built such that it has been decided not to use Object Repository at all. By: Noor Hossin Web: [email protected] Page: 27

28 When Application is Not Ready Yet - Suppose we need to start Automation before Build Release. Objects Repository in Read only or Shared Mode - wish to modify a UFT script but the Object repository for the same is read-only or in shared mode i.e. changes may affect other scripts as well. Similar Type of Objects - If Application under test is having similar type of objects or similar name objects. Advantages of Descriptive Programming 1. Version Free: Script can be executed in any version of QTP without any changes. 2. Code Portability: Just code is enough to run script. We can copy and paste in other scripts for any other new requirement. 3. Reusability of Properties: We can assign properties to a global variable and reuse it for same type of objects. 4. Plug & Play: Any time scripts will be in ready to run state. No need to worry about any other settings or files. 5. Just Maintenance of variables: Store the object properties in the form of variables in a txt / vbs file, need to maintain the file. Types of Descriptive Programming 1. Static Programming 2. Dynamic Programming 1. Static Programming: Provide the set of properties and values that describe the object directly in a VBScript statement. The general syntax for static descriptive programming is: TestObject("PropertyName1:=PropertyValue1", "PropertyName2:=PropertyValue2",, "PropertyNameN:=PropertyValueN") Example: Browser("title:=.*").page("title:=.*").WebEdit("html tag:=input", "name:=user", "type:=text").set "training1" qbrowser("title:=.*").page("title:=.*").webedit("html tag:=input", "name:=passwrd", "type:=password").set "abcd1234" Browser("title:=.*").page("title:=.*").webbutton("html tag:=input", "name:=login", "type:=submit").click Browser("title:=.*").page("title:=.*").Link("html tag:=a","text:=logout").click 2. Dynamic Programming: Add a collection of properties and values to a Description object, and then enter the Description object name in the statement. For Example: Set pnt=browser("title:=.*").page("title:=.*") Function WebEditSet(name,value) Set objwebedit=description.create objwebedit("html tag").value="input" objwebedit("name").value=name pnt.webedit(objwebedit).set value End Function WebEditSet "firstname","noor" By: Noor Hossin Web: [email protected] Page: 28

29 4.7 - Test Cases with Descriptive Programming Test Case: Login to piit.us using valid credential. 'Static Descriptive Programming SystemUtil.CloseProcessByName "iexplore.exe" SystemUtil.Run "iexplore.exe"," Browser("title:=.*").Page("title:=.*").Link("html tag:=a","innerhtml:=my Forum").Click Browser("title:=.*").Page("title:=.*").WebEdit("html tag:=input","name:=user","type:=text").set "training1" Browser("title:=.*").Page("title:=.*").WebEdit("html tag:=input","name:=passwrd","type:=password").set "abcd1234" Browser("title:=.*").Page("title:=.*").WebButton("html tag:=input","name:=login","type:=submit").click Browser("title:=.*").Page("title:=.*").Link("html tag:=a","text:=logout").click Browser("title:=.*").Close Test Cases Using Dynamic Descriptive Program with User-Defined Functions Test Cases: Register New User in Etsy.com SystemUtil.CloseProcessByName "iexplore.exe" Set Etsy=Browser("title:=.*").Page("title:=.*") Function LaunchApplication(BrowserName,AppURL) Select Case BrowserName Case "IE" SystemUtil.Run "iexplore.exe",appurl Case "Firefox" Systemutil.Run "firefox.exe",appurl Case "Chrome" SystemUtil.Run "chrome.exe",appurl End Select End Function Function LinkClick(htmlid) Set LinkClickObject=Description.Create LinkClickObject("html tag").value="a" LinkClickObject("html id").value=htmlid Etsy.Link(LinkClickObject).Click End Function Function WebEditSet(htmlid,value) Set WedEditObject=Description.Create WedEditObject("html tag").value="input" WedEditObject("html id").value=htmlid Etsy.WebEdit(WedEditObject).Set value End Function Function WebRadioSet(radvalue) Set WebRadioObject=Description.Create WebRadioObject("html tag").value="label" WebRadioObject("innerhtml").Value=radvalue Etsy.WebElement(WebRadioObject).Click End Function Function WebButtonClick(htmlid) Set WebButtonObject=Description.Create WebButtonObject("html tag").value="input" WebButtonObject("html id").value=htmlid By: Noor Hossin Web: [email protected] Page: 29

30 Etsy.WebButton(WebButtonObject).Click End Function LaunchApplication "IE"," LinkClick "register" WebEditSet "first-name","noor" WebEditSet "last-name","hossin" WebRadioSet "Male" Wait 3 WebEditSet " ","[email protected]" WebEditSet "password","abcd123" WebEditSet "password-repeat","abcd123" WebEditSet "username","nhrajib84" WebButtonClick "register_button" ************************************************************ CH-5: Checkpoints & Output Values A checkpoint is a verification that compares the current value for specified properties or current state of other characteristics of an object with the expected value or characteristics. This helps you to identify whether your application is functioning correctly Checkpoint Introduction A checkpoint verifies that expected information is displayed in your application while the test is running. When you add a checkpoint, UFT inserts a checkpoint step to the current row in the Keyword View, and for tests and scripted components, also adds a Check CheckPoint statement in the Editor. By default, UFT names the checkpoint using the name of the test object on which the checkpoint was created. You can choose to specify a different name for the checkpoint or accept the default name. When you run the test or component, UFT compares the expected results of the checkpoint to the current results. If the results do not match, the checkpoint fails. You can view the results of the checkpoint in the Run Results Viewer Checkpoint Type You can insert the following checkpoint types to check objects in an application: 1. Standard Checkpoint (Image Checkpoint, Page Checkpoint) 2. Text Checkpoint 3. Text Area Checkpoint 4. Bitmap Checkpoint 5. Accessibility Checkpoint 6. Database Checkpoint 7. XML Checkpoint (From Application) 8. XML Checkpoint (From Resource) 9. File Content Checkpoint Different Types of Checkpoints (1) Standard Checkpoint By: Noor Hossin Web: [email protected] Page: 30

31 Checks property values of an object in your application. For example, you can check that a radio button is activated after it is selected or you can check the value of an edit box. You can check the object property values in your application using standard checkpoints. Standard checkpoints compare the expected values of object properties to the object's current values during a run session. You can check that a specified object in your application has the property values you expect, by adding a standard checkpoint step to your test or component while recording or editing it. To set the options for a standard checkpoint, you use the Checkpoint Properties Dialog Box. For tests and scripted components: You can also use standard checkpoints to perform checks on images, tables, Web page properties, and other objects within your application. Standard checkpoints are supported for all add-in environments. Image Checkpoint (tests and scripted components only): Checks the value of an image in your application. For example, you can check that a selected image's source file is correct. You create an image checkpoint by inserting a standard checkpoint on an image object. Image checkpoints are supported for the Web add-in environment. Page Checkpoint (tests and scripted components only) - Checks the characteristics of a Web page. For example, you can check how long a Web page takes to load or whether a Web page contains broken links. You create a page checkpoint by inserting a standard checkpoint on a page object. Page checkpoints are supported for the Web add-in environment. Table Checkpoint (tests and scripted components only) - Checks information within a table. For example, suppose your application contains a table listing all available flights from New York to San Francisco. You can add a table checkpoint to check that the time of the first flight in the table is correct. You create a table checkpoint by inserting a standard checkpoint on a table object. Table checkpoints are supported for all add-in environments that have a *Table test object. Table checkpoints are also supported for some list view objects, such as WinListView and VbListView, as well as other list view objects in add-in environments. (2) Text Checkpoint (tests and scripted components only) Checks a text string is displayed in the appropriate place in an application. For example, suppose a Web page displays the sentence Flight departing from New York to San Francisco. You can create a text checkpoint that checks that the words "New York" are displayed between "Flight departing from" and "to San Francisco". Text checkpoints are supported for most add-in environments. (3) Textarea Checkpoint (tests and scripted components only) By: Noor Hossin Web: [email protected] Page: 31

32 Checks that a text string is displayed within a defined area in a Windows/Web based application, according to specified criteria. Text area checkpoints are supported for all Windows-based environments, such as Standard Windows, Visual Basic, and ActiveX add-in environments (see Supported Checkpoints). Text area checkpoints are also supported for some other add-in environments, such as Java. (4) Bitmap Checkpoint Checks an area of your application as a bitmap. For example, suppose you have a Website that can display a map of a city the user specifies. The map has control keys for zooming. Using the bitmap checkpoint, you can check that the map zooms in correctly. You can also check that a specific bitmap exists in your application. For example, you can check that your company logo is displayed anywhere on your Web page. You can create a bitmap checkpoint for any area in your application. Bitmap checkpoints are supported for all add-in environments. (5) Accessibility Checkpoint (tests and scripted components only) Identifies areas of your Web site that may not conform to the World Wide Web Consortium (W3C) Web Content Accessibility Guidelines. For example, guideline 1.1 of the W3C Web Content Accessibility Guidelines requires you to provide a text equivalent for every non-text element. You can add an Alt property check to check whether objects that require the Alt property under this guideline, do in fact have this tag. Accessibility checkpoints are supported for the Web add-in environment. (6) Database Checkpoint (tests and scripted components only) Checks the contents of a database accessed by your application. For example, you can use a database checkpoint to check the contents of a database containing flight information for your Web site. Database checkpoints are supported for all add-in environments. (7) XML Checkpoint (tests and scripted components only) Checks the data content of.xml documents in xml files or.xml documents in Web pages and frames. The XML Checkpoint (Web Page/Frame) option is supported for the Web add-in environment. The XML Checkpoint option is supported for all add-in environments. (8) File Content Checkpoint (tests only) Checks the text in a dynamically generated (or accessed) file. For example, suppose your application generates a.pdf. You can check that the correct text is displayed on specific lines in on specific pages in that.pdf. File content checkpoints are supported for all add-in environments. By: Noor Hossin Web: [email protected] Page: 32

33 5.4 - How to Insert a Checkpoint in a GUI Test 1. Start a recording session before inserting a checkpoint 2. Insert a checkpoint by doing one of the following: a. In the Record toolbar, click the Insert Checkpoint or Output Value button and select the type of checkpoint from the drop-down list. b. Select Design > Checkpoint and choose the relevant type of checkpoint. c. Click the Insert Checkpoint or Output Value button in the toolbar and select the type of checkpoint from the drop-down list. 3. UFT is hidden, and the pointer changes to a pointing hand. In your application, click the object that you want to check. Note: If the object in your application is associated with more than one location, the Object Selection dialog box opens. This dialog box enables you to select an object to check from the object tree. The objects in the tree are displayed with hierarchical order, based on the location you clicked in the Active Screen or application. Insert a Checkpoint Step While Editing Your Test or Scripted Component 1. You may need to open the application and display the relevant object before inserting a checkpoint. This depends on the environment and the object type you are checking. For details, see the prerequisite information for your specific checkpoint type. 2. Select the step where you want to add the checkpoint and do one of the following: a. Select Design > Checkpoint, and then select the relevant checkpoint option. b. Select Design > Checkpoint > Existing Checkpoint. c. Right-click any object in the Active screen and select the relevant checkpoint. You can create checkpoints for any object in the Active Screen even if the object is not part of any step in the Keyword View. If you use the Active Screen to insert a checkpoint, ensure that the Active Screen contains sufficient data for the object you want to check. Note: If the object in your application is associated with more than one location, the Object Select Dialog Box opens. This dialog box enables you to select an object to check from the object tree. The objects in the tree are displayed in hierarchical order, based on the location you clicked in the Active Screen or application. Set Options for the Checkpoint In the Checkpoint Properties Dialog Box, specify the settings for the checkpoint object. Move checkpoint objects from the local object repository to a shared object repository - optional After you insert a checkpoint step, the checkpoint object is added to the local object repository. If you are using shared object repositories, you can move the new checkpoint object to your shared object repository. By: Noor Hossin Web: [email protected] Page: 33

34 Use programming to insert a checkpoint in a test or scripted component If you want to retrieve the return value of a checkpoint (a boolean value that indicates whether the checkpoint passed or failed), you must add parentheses around the checkpoint argument in the statement in the Editor. For example: a = Browser("MyBrowser").Page("MyPage").Check (CheckPoint("MyProperty")) You can also use the CheckProperty method and the CheckItemProperty method to check specific property or item property values. For details, see the HP UFT Object Model Reference for GUI Testing Output Values Introduction An output value is a step in which one or more properties of objects, database field values, text presenting objects are captured during test execution and can store on data table in test result window. You can output values like text, string from the objects, table cells, databases, and XML documents. Output values enable to view the values that the application talks during run time. When parameterized, the values change for each iteration. Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table. Output Values can be stored into: 1. A Test or Action Parameter 2. The Run Time Data Table 3. An Environment Variable During run time, QTP stores output value in datasheet which is cleared as soon as test is over. Types of Output Values: 1. Standard Output Value 2. Text Output Value 3. Text Area Output Value 4. Database Output Value 5. XML Output Value (From Application) 6. XML Output Value (From Resource) 7. File Content Output Value Configuring, Storing & Using Output Values (1) Standard Output Value: A Standard output value can be used on any object to output value of any of its properties. You can select one or many properties from the same object as output. Steps to follow for Inserting Standard Output Value: Recording Mode > Insert Menu > Output Value > Standard Output Value > Show the Object > Click OK > Select Property > If required Change the Column Name > Click OK > Click OK > Stop Recording. By: Noor Hossin Web: [email protected] Page: 34

35 Table Output Value: Table Output Value is used to get the data from specified cell in a WebTable. This option is not visible in QTP. But you can implement this by standard output value. (2) Text Output Value: We can use text Output Values to output text strings displayed on a Web page or application. When creating a text Output Value, We can output a part of the object's text. We can also specify the text before and after the output text. Steps to follow for Inserting Text Output Value: Recording Mode > Insert Menu > Output Value > Text Output Value > Show the Text > Select one of the Option{output text/text before/text after} > Click Modify if you want to Change the Column Name > Click OK Check in runtime table after executing. (3) Text Area Output Value: We can use text area Output Values to output text strings displayed within a defined area of a screen in a Windows application. Steps to follow for Inserting Text Area Output Value: Recording Mode > Insert Menu > Output Value > Textarea Output Value > Mark the Text Area > If required click modify the Column Name > Click OK > Again Click OK > Check in Run Time table after executing. (4) Database Output Value: We can use database Output Values to output the value of the contents of database cells, based on the results of a query (result set) that we define on a database. Steps to follow for Inserting Database Output Value: Recording Mode > Insert menu > Output Value > Database Output Value > Choose specify SQL statements manually > Click Next > Click Create > Select Machine Data source > Select Driver (QT_flight32) > Click OK > Enter SQL statement {select * from orders} > Click Finish > Select Data Cells > Click OK > Execute and see the results in run time table. (5) XML Output Value (From Application): We can use XML Output Values to output the values of XML elements and attributes in XML documents. Steps to follow for Inserting XML Output Value from application: Recording Mode > Insert Menu > Output Value > XML Output Value from Application > Show the XML Document > Select Elements > Click OK > Stop Recording. 6. XML Output Value (From Resource): Use to get the values from external XML file to parameterize your test. Steps to follow for Inserting XML Output Value from Resources: Recording Mode > Insert Menu > Output Value > XML Output Value from Resource > Show the XML Document > Select Elements > Click OK > Stop Recording. 7. File Output Value: By: Noor Hossin Web: [email protected] Page: 35

36 Steps to follow for Inserting File Output Value: Recording Mode > Insert Menu > Output Value > File Output Value > > Stop Recording. Output Values Test Script: Test Case: Write 1st Doctor's name, address, phone, distance, specialty from Environmental variables to Excel Sheet Browser("CareFirst Member - Find_2").Page("CareFirst BlueCross BlueShield_6").Link("Sethi, Kamaljit K, MD").Output CheckPoint("Sethi, Kamaljit K, MD") Browser("CareFirst Member - Find_2").Page("CareFirst BlueCross BlueShield_6").WebElement("6305 Castle Pl#3BFalls").Output CheckPoint("6305 Castle Pl#3BFalls Church, VA 22044") Browser("CareFirst Member - Find_2").Page("CareFirst BlueCross BlueShield_6").WebElement("(703) ").Output CheckPoint("(703) ") Browser("CareFirst Member - Find_2").Page("CareFirst BlueCross BlueShield_6").WebTable("24.0 miles").output CheckPoint("24.0 miles") Browser("CareFirst Member - Find_2").Page("CareFirst BlueCross BlueShield_6").WebElement("Nephrology").Output CheckPoint("Nephrology") Wait 7 Set excel=createobject("excel.application") Set Wb=excel.Workbooks.Open("E:\Docs\Unified Functional Testing\CarefirstRecording\Doctors Name Reording.xlsx") Set Ws=Wb.Worksheets("Sheet1") Ws.Cells(2,"A")=Environment.Value("drname") Ws.Cells(2,"B")=Environment.Value("address") Ws.Cells(2,"C")=Environment.Value("phone") Ws.Cells(2,"D")=Environment.Value("distance") Ws.Cells(2,"E")=Environment.Value("speciality") Wb.Save Wb.Close excel.quit Set Ws=Nothing Set Wb=Nothing Set excel=nothing *************************************************************************** CH-6: Debugging Test Script Debugging, in automation testing context, is a systematic process of spotting and fixing the coding issues in the automation scripts so that the script will be more robust and can spot the defects in the application Debugging Introduction A debugger is a tool to help you follow the logic of your test code as it runs. Debugging is attempting to figure out the cause of a problem in your test script, and then taking action to fix the problem. Debug Viewer: Debug Viewer is used for locating and rectifying or fixing errors. It can be used for debugging the tests by step by-step execution. Using the Debug command in UFT allows you to run your test line by line. To do so Microsoft Script Debugger must be installed. By: Noor Hossin Web: [email protected] Page: 36

37 To open the Debug Viewer pane: View > Debug The UFT Debugger has Seven Main Areas: 1. Breakpoints 2. Call Stack 3. Loaded Modules 4. Threads 5. Local Variables 6. Console 7. Watch (1) Breakpoints Breakpoints instruct UFT to pause a run session at a predetermined place in a component or function library. UFT pauses run when it reaches the breakpoint, before executing the step. We can then examine the effects of the run up to the breakpoint, make any necessary changes, and continue running the component or function library from the breakpoint. You can use Breakpoints: To pause a run session and observe or obtain certain information about your test. Mark a point from which to begin stepping through a component or function library using the step commands. Breakpoints are applicable only to the current UFT session and are not saved with component or function library. Options in Breakpoint: Various Options in Break Point can be accessed by Navigating 'Run' Menu. A. Insert/Remove BreakPoint (F9) B. Enable/Disable BreakPoint (Ctrl+F9) C. Clear All BreakPoint (Ctrl+Shift+F9) D. Enable/Disable All BreakPoints (Use Only Menu) (A) Insert/Remove BreakPoint (F9): You can add a breakpoint by clicking in the left gray margin next to the line of code that you want your script to stop on. Break Points can be inserted just by pressing "F9" or by using the Menu option Run > Inserting/Removing Break Point. After Inserting the Break point the "Red Coloured" Dot and the line will be highlighted in RED as shown below: By: Noor Hossin Web: [email protected] Page: 37

38 Now when you run your script, UFT should pause on the msgbox total. Hit the F10 key on your keyboard to run the next line of code. A message box should appear with a value of 45. (B) Enable/Disable BreakPoint (Ctrl+F9): Run > Enable/Disable BreakPoint Or Click on View > Debug > Breakpoints. The Breakpoint Pane should appear with a list of all the current breakpoints you've have added into your script. Disable/Enable Breakpoints (The second icon) (C) Clear All BreakPoint (Ctrl+Shift+F9): Run > Clear All BreakPoint Or Click on View > Debug > Breakpoints. The Breakpoint Pane should appear with a list of all the current breakpoints you've have added into your script. Remove a Single Breakpoint (The first icon with the X) (D) Enable/Disable All BreakPoints (Use Only Menu): Run > Enable/Disable All BreakPoints (2) Call Stack A call stack is a view of the nested sequence of functions that have led to a certain point in your test code. For example: msgbox addnumbers(30,10,20) Function addnumbers (x, y, z) total = x + y + z subtotal = subtractnumbers(total,5,4) addnumbers = subtotal End Function Function subtractnumbers (x, y, z) subtractnumbers = x + y + z End Function Steps: Set a breakpoint on the msgbox addnumbers line. Run your script. When the script pauses, click on View > Debug > Call Stack. Hit the F11 key to Step Into. Stack trace will show you the sequence of calls your script has made up until that point. It can help you get your bearings if you're debugging long, nested functions. (3) Loaded Modules (API testing only) Displays information about the.dll files associated with your run session and provides the path to find and debug them. This pane displays information only when a run session is paused. So the list of.dll files is displayed only when you pause a run session. By: Noor Hossin Web: [email protected] Page: 38

39 To Access: 1. Do one of the following: Ensure that an API test, component, or user code file is in focus in the document pane. In the solution explorer, select an API test, component, or user code node. 2. Select View > Debug > Loaded Modules (4) Threads (API testing only) Displays information about the threads running in your current run session. The list of threads is displayed only when you pause a run session. If your test contains only one thread, then this pane is not available. If the thread is contained within a user code file, you can double-click on the thread to navigate directly to the beginning of the thread. To Access: 1. Do one of the following: Ensure that an API test, component, or user code file is in focus in the document pane. In the solution explorer, select an API test, component, or user code node. 2. Select View > Debug > Threads (5) Local Variables Run the Debug script again and while it is paused, click on the UFT View > Debug > Local Variables option. You should now see a list of the current values contained in all your scripts variables: This is great if your script is failing and you need to confirm whether or not the value you expect is actually showing up. (6) Console The console can be a pretty powerful debugging tool. While you are debugging and UFT is paused on a line of code, you can perform multiple activities, like: Obtain info from the application under test. Run a test method and display the return value. Set or modify variables. Call a native run time object method in your app. You can interact with the console by typing a line of code to be run in the context of your suspended run session. By: Noor Hossin Web: [email protected] Page: 39

40 For Example: x = 20 y = 10 z = 30 total = x + y + z msgbox total Steps: Add a breakpoint near the msgbox total line and Run your script. When the script pauses, click on View > Debug > Console. At the Console > prompt, enter y = 2 and Hit Enter. At the Console > prompt, enter z = 2 and Hit Enter. Hit the F10 key to Step Over the paused line of code. The message box should now show a value of 24 instead of 60. Basically, what you ve done is modified the variables values at run-time. The y variable now contains a value of 2 and the z variable now contains a value of 2. (7) Watch Watch pane allows you to set specific values to watch for selected variables and expressions in your test's suspended run session. In a real world test script, you might have many variables but you may only be interested in 1 or 2 or them for your debugging purposes. This pane allows you to specify only the variables that you'd like to watch during the execution of your tests. For example, say we only want to watch the Y value in our test example. x = 2 y = 10 z = 22 total = x + y + z msgbox total y = total z = 10 y = total + z + 42 msgbox total Steps: Add a breakpoint near the msgbox total line and Run your script. When the script pauses, click on View > Debug > Watch. In the Watch Pane, click on the Add (+) icon. Under Add New Watch, enter Y. Click OK. You should now see a current value of Y in the Watch pane area. Keep hitting the F10 key and watch how the current value of Y is updated as you step through the rest of the code Different Types of Debugging Techniques: While debugging your script you can navigate a few different ways. The UFT's debugger has three kinds of navigation options, called "Stepping". 1. Step Into 2. Step Over 3. Step Out Step Into (F11): Used to execute each and every Step. Steps into the Function/Action and executes line by line. It pauses on each line after execution. By: Noor Hossin Web: [email protected] Page: 40

41 Step Over (F10): Execute the currently highlighted line of code without stepping into any functions called by that line of code. Step Over runs only the current step in the active document. Step Out (Shift+F11): After Step Into the function, you can use the Step Out command. Using Step Out allows you to get back quickly. Step Out continues the run to the end of the function and then pauses the run session at the next line. Stepping Test Code: msgbox addnumbers(50,20,10) Function addnumbers (x,y,z) addnumbers = x + y + z End Function Steps: Set a breakpoint on the msgbox addnumbers line. Run your test. When the test pauses, hit the F10 key to Step Over the highlighted line of code. A message box should appear with a value of 80. Now let's step into code and see what happens: Set a breakpoint on the msgbox addnumbers line. Run your test. When the test pauses, hit the F11 key to step into the highlighted line of code. Notice how it actually goes into the next line of code that is located in your addnumbers function. Keep hitting F11 until the message box appears with a value of 80. If our function had 20 lines of code, hitting the F11 key would step through each line of code. *************************************************************************** CH-7: Error Handling & Recovery Scenarios If you can predict that a certain event may happen at a specific point in your test or component, it is recommended to handle that event directly within your test or component by adding steps such as If Statements or Optional Steps or "On Error Resume Next". Using Recovery Scenarios may result in unusually slow performance of your tests. They are designed to handle a more generic set of unpredictable events which CANNOT be handled programmatically Error Handling Error handling is basically anticipating an error at any point of the script then detecting that particular error and finally resolving or handling the error. Error Types: There are three possible kinds of error type one would encounter while working with UFT. 1. Syntax Errors 2. Logical Errors By: Noor Hossin Web: [email protected] Page: 41

42 3. Run Time Errors Syntax Errors: Syntax errors are basically the typos or a part of the code that does not confirm with the grammar of the scripting language (here VBScript). Syntax errors occur at the time of compilation of code and can be easily detected before the execution of the code. To check syntax in UFT we can use the keyboard shortcut is Ctrl+F7. Logical Errors: A logical error is something that makes a part of code to produce unexpected results. Logical error does not halt or stop the execution but makes it to produce incorrect results. Logical errors could occur because of some misconception or wrong understanding of the requirement and the only way to detect a logical error is to correctly interpret the incorrect outcomes of that particular code snippet. Run Time Errors: Run time errors are basically those errors which occur during the execution of the code (at run time). The basic reason of occurrence of these errors is when your script tries to perform a certain action but due to any reason that action is not possible to perform. Classic Examples for Run Time Errors are, File NOT found but the script trying to read the file. Object NOT found but script is trying to act on that particular object. Dividing a number by Zero. Array Index out of bounds while accessing array elements. Handling the Error: You cannot skip from syntax errors. You must fix them in order to start execution. There is no specific recovery mechanism for VBScript runtime errors. There are multiple approaches to handle the errors in the QTP as in: 1. Exist Property 2. Optional Steps 3. On Error Statement 4. Recovery Scenarios Optional Steps An optional step is a step that is not necessarily required to successfully complete a run session. If UFT cannot find an object designated as optional while running a test, it bypasses the step, and continues the run. By default, UFT automatically marks steps that open certain dialog boxes as optional. You can manually designate additional steps as optional. Dialog Box Titlebar Any other Dialog Boxes AutoComplete File Download Internet Explorer By: Noor Hossin Web: [email protected] Page: 42

43 Netscape Enter Network Password Error Security Alert Security Information Security Warning Username and Password Required Setting Optional Steps: In the Keyword View, right-click the step and select Optional Step. The Optional Step icon is added next to the selected step. For example, OptionalStep.Browser("Browser").Dialog("Security Warning").WinButton("Yes").Click On Error Statement (programmatic handling of errors) On Error statement enables or disables the error handling mechanism in the UFT. If we have not used On Error statement in our function then any run time error will appear as a pop up dialog and the script execution will stop at that particular code line. Enabling and disabling is done with the below mentioned statements: 1. On Error Resume Next 2. On Error Go to 0 3. err.number 4. err.description On Error Resume Next: If there is error in the code "On error Resume Next" ignores it and continues with next line of code. When using this statement, the error popup will not be displayed on failure and goes to the next statement for execution. On Error Resume Next x = 20 y = 10 z = 30 total = x + y + z msgbox total On Error Go to 0: This statement disables error handling we have previously enabled by using "On Error Resume Next". For example, On Error Resume Next a = 10 b = 0 c = a/b On Error GoTo 0 d = c/b msgbox c & d err.number & err.description: By: Noor Hossin Web: [email protected] Page: 43

44 Provides error number and description of error. This object captures the information about runtime errors. Using this you can always get the last error details. To access error details you can use err.number or err.description statements. We can clear and raise the runtime errors using this object. 'Call the function to divide Call division Function division() On Error Resume Next 'divide by zero z=40/0 'Report the error occured. You can see the error number and description in result summary If Err.number <> 0 then Reporter.ReportEvent micwarning,"error Occured","Error number is" & err.number & " and description is: "& err.description 'disables error handling On Error GoTo 0 End if End function Recovery Scenarios When executing scripts we may get some unexpected errors. To recover the test and continue running script from these unexpected errors we use Recovery Scenarios. Recovery Scenarios are useful to continue the script execution whenever an error/exception/unexpected event interrupts the script execution. But Recovery Scenarios will not handle VBScript Errors. It can only handle UFT Errors. The Recovery Scenario Manager can be accessed by Navigating to Resources > Recovery Scenario Manager Recovery Scenario Manager can handle following four events: 1. Pop-up Window: To handle unwanted pop ups. 2. Object State: To handle object related errors at runtime. 3. Test Run Error: To handle VBScript statement errors at runtime. 4. Application Crash: To handle crashed applications at runtime. A recovery scenario consists of the following: Trigger Event: The event that interrupts your run session. For example a window that may pop up on screen. Recovery Operations: The operations to perform to enable QTP to continue running the test after the trigger event interrupts the run session. For example, clicking an OK button in a pop-up window. Post-Recovery Test Run Option: The instructions on how UFT should proceed after the recovery operations have been performed, and from which point in the test UFT should continue. Steps to Create Recovery Scenarios: Step 1: Upon Clicking "New" Recovery Scenario button, the Recovery Scenario Wizard opens as shown below: By: Noor Hossin Web: [email protected] Page: 44

45 Step 2: Next Step is to choose the Trigger Event. It corresponds to event which arises. It can be any of the below four events. Pop-Up Window Object State Test Run Error Application Crash Step 3: Recovery Operations Window Opens. Recovery Operation can perform any of the following Operation as shown below: Select an operation and click Next > Step 4: Upon Specifying the appropriate Recovery Operation, we need to specify the Post Recovery Operation as well as shown below: By: Noor Hossin Web: Page: 45

46 Step 5: Upon Specifying the Post Recovery Operation, the recovery scenario should be named and added to the Test so that it will be activated. Step 6: The Recovery Scenario creation is complete and needs to be mapped to the current Test by checking the option "Add Scenario to the current Test" and click "Finish". Step 7: The Added Recovery Scenario will be as shown below and click on "Close" Button to continue. Step 8: Upon Clicking on Close Button, UFT would pop up user to save the created Recovery Scenario. It will be saved with the extension.qrs and the wizard would be closed. Associating Recovery Scenarios to Test The Created Recovery Scenario should be part of the test now and can be verified by navigating to: File > Settings > Recovery When to use Recovery Scenarios? By: Noor Hossin Web: Page: 46

47 A recovery scenario can handle a printer error by clicking the default button in the Printer Error message box. You cannot handle this error directly in your test, since you cannot know at what point the network will return the printer error. You could try to handle this event in your test by adding an If Statement immediately after the step that sent a file to the printer, but if the network takes time to return the printer error, your test may have progressed several steps before the error is displayed. Therefore, for this type of event, only a recovery scenario can handle it. ************************************************************ CH-8: Working with Actions An action helps testers to divide scripts into groups of QTP statements. Actions are similar to functions in VBScript, however there are few differences. Actions are in built feature of UFT and Functions are supported by both VBScript and QTP. Actions parameters are passed byvalue only and Function parameters are passed either by byvalue or byref. Actions may or maynot be reusable and Functions are always being reusable Introduction to Actions UFT Action is a placeholder or a component in which you can write your scripts or code. Whenever you create a new test case, an action will also be created automatically for that test case. By Default UFT creates a test with 1 action. You can add more Actions to your UFT Script as per requirements. Actions have extension.mts. Action Properties: The properties of the action can be accessed by Right Clicking on the Script Editor Window and Selecting "Properties". Action properties contains following information General Properties: Action Name Location Description Reusable Parameters: Input Parameters Output Parameters Used By: Used By is supported only for tests stored in ALM Different Types of Actions UFT actions can be classified into the following different types: 1. Non-Reusable Action 2. Reusable Action By: Noor Hossin Web: [email protected] Page: 47

48 Non-Reusable Action: An action that can be called only in the test with which it is stored, and can be called only once. These can't be called from external tests. Reusable Action: An action that can be called multiple times by the same test in which it is stored and by other external tests also. UFT actions also can be following two types: 1. Internal Actions 2. External Action Internal Action: An internal action is one that is stored within that test case. This action can be reusable as well as non-reusable. External Actions: An external action is one that is stored in some other test case. External actions should be reusable otherwise it can't be used outside the test case Creating and Calling Actions You can insert a call to a reusable action that is stored in your current test (local action), or in any other test (external action). Inserting a call to an existing action is similar to linking to it. Creating and Calling Actions are as: 1. Call to New Action 2. Call to Copy of Action 3. Call to Existing Action (1) Call to New Action Testers can insert a new action at any point of the script by performing the following steps: Step: 1 - Right Click on the Scripting area and select "Call to New Action" Or, Design > Call to New Action Step: 2 - In the "Insert Call to New Action" Window, give the test name, description, and also specify if it is a reusable action or not. Select the location the action to be inserted. Step: 3 - User Can check the changes graphically in the test Name Tab. We can also use QTP commands to call the Action at any point in the script. RunAction "Action2", oneiteration 'Executes Action2 Action for one iteration. (2) Call to Copy of Action Step 1: Right Click on the Scripting area and select "Call to Copy of Action" Or, Design > Call to Copy of Action Step 2: In the "Call to Copy of Action" Window, Select the "Test Name", "Action Name" and also select the location the action to be inserted. Step 3: Immediately script is autogenerated to show that the copy of an action is inserted. RunAction "Copy of Action2", oneiteration By: Noor Hossin Web: [email protected] Page: 48

49 Step 4: User can check the changes graphically in the test Name Tab. (3) Call to Existing Action Step 1: Right Click on the Scripting area and select "Call to Existing Action" Or, Design > Call to Existing Action Step 2: In the "Select Action" Window, give the test name, Action name, description and also specify the location of the action to be inserted. Step 3: Once inserted, the below script is generated exactly in the location where the action was inserted. RunAction "Action1", oneiteration Step 4: User can check the changes graphically in the test Name Tab. Operations Performed on Actions: Rename: Right Click on Action > Rename (F2) Delete: Right Click on Action > Delete Action Edit: Right Click on Action > Properties Parameterization in UFT Parameterization is a process in which parameters or variables are substituted for hard-coded values which help perform the same operations on the AUT with multiple sets of data. When a test is recorded using UFT s recording engine all the values are hardcoded. If we want to run the same test many times, the application might throw error because of duplication of data. Hence, the data needs to be parameterized from an external means. QTP Parameterization helps automation developers test an application with different data from a single action (or multiple actions) through multiple iterations. * Parameterization is nothing but giving multiple Input/Test data to the test script. Types of Parameterization in QTP 1. Data Table Parameters 2. Environment Variable Parameters 3. Random Number Parameters 4. Test/Action Parameters 1. Data Table Parameters: QTP provides an excellent feature called Data Table for parameterization. Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, QuickTest uses a different value from the Data Table. During the first iteration, it will use the data in the first row. During the second it will use data in the second row and so on. Open Data Table: Click View > Data Table Double click 1st column header "A" and change to ObjectName and put Value in Row By: Noor Hossin Web: [email protected] Page: 49

50 Double click 2nd column header "B" and change to ObjectName and put Value in Row Double click third column header "C" and change to ObjectName and put Value in Row And so on. View > Keyword View Name: The corresponding column name in the data table from where the data needs to be taken. By default QTP will suggest a name. You have an option to keep it as suggested or change it as needed. Global Sheet: This sheet of data is available to all the actions in a test. 'If retrieving data from Global DataTable (dtglobalsheet) DataTable("ColumnName", dtglobalsheet) Current Action Sheet or Local Sheet: The sheet of data that is available to a certain action. 'If retrieving data from Local DataTable (Action1, Action2,.. ActionN) DataTable("ColumnName", dtlocalsheet) Test Script: Create an Account as a worker in elance.com '*****Parameterization Using Data*****' SystemUtil.CloseProcessByName "iexplore.exe" SystemUtil.Run "iexplore.exe"," Browser("Hire freelancers and find").page("hire freelancers and find").link("register Now (it's free)").click Browser("Elance: Signup Select").Page("Elance: Signup Select").WebElement("I want to WorkFind clients,").click Wait 2 Browser("Elance: Signup Select").Page("Elance: Signup Select").Link("Continue»").Click Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit(" Address").Set DataTable("A", dtglobalsheet) Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("firstName").Set DataTable("B", dtglobalsheet) Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("lastName").Set DataTable("C", dtglobalsheet) Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("username").Set DataTable("D", dtglobalsheet) Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("password1").Set DataTable("E", dtglobalsheet) Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("password2").Set DataTable("F", dtglobalsheet) Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebList("country").Select DataTable("G", dtglobalsheet) Browser("Elance: Signup Select").Page("Elance: Freelancer Registratio").WebElement("Individual").Click Browser("Elance: Signup Select").Page("Elance: Freelancer Registratio").WebElement("Display last initial only.").click Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebList("source").Select DataTable("H", dtglobalsheet) Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebCheckBox("showInitialOnly").Click Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebCheckBox("tos").Click Browser("Hire freelancers and find").page("elance: Freelancer Registratio").Link("Register").Click 2. Environment Variable Parameters: Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that QuickTest generates for you based on conditions and options you choose. Environment Variable Types: Three types of Environment variable are available as follows. By: Noor Hossin Web: [email protected] Page: 50

51 I. Built-in - Predefined variables that represent information about the test or scripted component and the system on which they are run, such as Test path (TestDir) and Operating system (OS). These variables are accessible from all tests and scripted components, and are designated as read-only. Built-In environment variable value can not be altered. II. III. User-defined Internal - User-defined internal environment variables are defined within the test. These variables are saved with the test and are accessible only within the test in which they were defined. You can create or modify internal, user-defined environment variables for your test in the: File > Settings > Environment > User Defined > + User-defined External - User-defined external environment variables are predefined in the active external environment variables file. You can create as many files as you want and select an appropriate file for each test, or change files for each test run. External environment variable values are designated as read-only within the test. External environment variable files are comprised of a list of variable-value pairs in.xml format. You select the active external environment variable file for a test in the Environment pane of the Test. To create user defined External variable: File > Settings > Environment > User Defined > Export Save it and Create the the.xml file as follows: <Environment> <Variable> <Name>Gmail_ID</Name> <Value>User</Value> </Variable> </Environment> File > Settings > Environment > User Defined > File For use Environmental variable Parameterization: View > Keyword View and then select the cell which contains "Gmail" and click on <#> symbol. Then value configuration dialog option open and select parameter as Environmental variable Parameterization. Select name and value for parameter. Test Script: Login to elance.com and Write Output Values in Excel Sheet. 'Environment Variable - Login to elance.com and Write Output Values in Excel Sheet SystemUtil.CloseProcessByName "iexplore.exe" RepositoriesCollection.Add "E:\Docs\Unified Functional Testing\groupdiscusion\environment.tsr" SystemUtil.Run "iexplore.exe"," 'Login to elance.com Browser("Hire freelancers and find").page("hire freelancers and find").link("sign In").Click Browser("Hire freelancers and find").page("elance: Please Sign In").WebEdit("lnm").Set Environment.Value("user") Browser("Hire freelancers and find").page("elance: Please Sign In").WebEdit("pwd").Set Environment.Value("pass") Browser("Hire freelancers and find").page("elance: Please Sign In").WebElement("Sign In").Click Wait 3 Browser("Elance").Page("Elance").WebElement("WebElement").Click Wait 2 'Write Output Values in Excel Sheet Browser("Opportunities").Page("Opportunities").Link("Nagios Network Monitoring").Output CheckPoint("Nagios Network Monitoring") Browser("Opportunities").Page("Opportunities").WebElement("$500 - $1,000").Output CheckPoint("$500 - $1,000") By: Noor Hossin Web: [email protected] Page: 51

52 Browser("Opportunities").Page("Opportunities").WebElement("Networking & Security").Output CheckPoint("Networking & Security") Browser("Opportunities").Page("Opportunities").WebElement("Posted: Feb 13, 2015").Output CheckPoint("Posted: Feb 13, 2015") Browser("Opportunities").Page("Opportunities").Link("57 Proposals").Output CheckPoint("57 Proposals") Set excel=createobject("excel.application") Set wb=excel.workbooks.open("e:\docs\unified Functional Testing\groupdiscusion\environment.xlsx") excel.visible=true Set ws=wb.worksheets("sheet1") ws.cells(2,"a")=environment.value("job") ws.cells(2,"b")=environment.value("price") ws.cells(2,"c")=environment.value("category") ws.cells(2,"d")=environment.value("posted") ws.cells(2,"e")=environment.value("proposal") wb.save wb.close excel.quit Set ws=nothing Set wb=nothing Set excel=nothing 3. Random Number Parameters: Random number parameter enables to insert random numbers as values in test or component. For Example, For i = 1 To 5 Step 1 x=randomnumber(1,100) print x Next Randomly picks a value from 1 to 100. As QTP count starts with 0, number one is added in the function to pick the number from 1. For use Random Number Parameterization: View > Keyword View Select the cell which contains Set and click on <#> symbol. Then Value Configuration Options dialog box open. Select parameter as Random Number Parameterization. Set the following option to configure Random Number Parameterization I. Numeric Range (Enter the number range which random number generated) II. Name (Add a variable name to parameter) III. Generate New random number: For each action iteration (Generate new number at the end of each action iteration) For each test iteration (Generate new number at the end of each test iteration) Once per entire test run (Generate a new number the first time the parameter is used. This same number used for parameter throughout the test run) In real time, this is a very useful feature that can help the tester automate the scenarios in which the numeric range of data needs to be verified. Random Number Parameters are not appropriate for non-numeric values such as text or hypertext. By: Noor Hossin Web: [email protected] Page: 52

53 If you select an existing parameters in your test and modify the settings all instances of that parameter affected. Test Script: Set Random Number on Google.com Search Box SystemUtil.CloseProcessByName "iexplore.exe" '***Random Number Parameters - Search Google.com***' SystemUtil.Run "iexplore.exe"," Browser("Google").Page("Google").WebEdit("q").Set RandomNumber("number") Browser("Google").Page("Google").WebButton("Google Search").Click 4. Test/Action Parameters: Test Parameters are those which are passed across a test globally. These can be used by any action/actions present in the test. Action parameters enables to pass values from one action to other action in your test. These can be used only across the passed actions. We can then use that parameter value to parameterize a step in the test. Action Parameters are divided into types: 1. Input Parameters 2. Output Parameters Input Parameters: Input parameter specifies the parameters that the test/action can receive values from the source that runs or calls it. In short input parameters pass values into your test. Output Parameters: Output parameter specifies the parameters that the test/action can pass to the source that runs or calls it. In short output values passes values from your test to external sources. Step 1: Define Test Parameters: Right click on Action node and select action Properties. To add a new parameter click on '+' button. To delete existing parameter in the list, select the parameter and click on 'X' button. To add parameters, click on Add ('+') button. Go to the name box and add a name to the parameter. This is a required field. It should be kept in mind that name field is case sensitive. Select the type of parameter from type drop down. Type drop down provides a list of parameter types such as string, Boolean, date, number, password and Any. This is also a required field. Enter some default value to the parameter in Default value box. The default value is required to run the test if no value is received from test. Description is an optional field. This field is used to enter some description about the parameter. For Example, Name Type Default Value Description User String uftlab Pass Password qtpalm12 For Use Parameter Variable: View > Keyword View Select the Operation cell which contains Set and click on <#> symbol. Then Value Configuration Option dialog open. Select parameter as Test/Action Parameters and Parameter name. Step 2: Create new script name as "ActionParametersCalled" By: Noor Hossin Web: [email protected] Page: 53

54 Design > Call to Existing Action... Select Action dialog box open. Select From test as "groupdiscusion". Select Action: "ActionParameters". Click OK. ActionParametersCalled script looks like: RunAction "ActionParameters", oneiteration Right click on node login and select Action call properties -> display Action call properties dialog -> select parameter values tab -> Enter value for Uname and Pswd like Name Type Default Value Description Uname String DemoUser Pswd Password ******* Final script looks like RunAction "Action1 [parameter1]", oneiteration, "DemoUser", "50d843bc6f4f3633" Click ok and run the script Now script2 calls Action login from script1 and passess username and password as DemoUser and ******* Test Script: Log In to Gmail.com Using Test/Action Parameters SystemUtil.CloseProcessByName "iexplore.exe" '***Test/Action Parameters - Log In to Gmail.com***' SystemUtil.Run "iexplore.exe"," Browser("Gmail - Free Storage and").page("gmail - Free Storage and").link("sign in").click Browser("Gmail - Free Storage and").page("gmail").webedit(" ").set Parameter("user") Browser("Gmail - Free Storage and").page("gmail").webedit("passwd").set Parameter("pass") Browser("Gmail - Free Storage and").page("gmail").webelement("stay signed in").click wait 2 Browser("Gmail - Free Storage and").page("gmail").webbutton("sign in").click ************************************************************ CH-9: Working with Databases Database plays a crucial role in designing a robust framework in UFT. It provides flexibility to user to add or delete data irrespective to script of UFT Introduction to Databases Database is a collection of data or meaningful information that is organized in such a way that user can access, manipulate, retrieve, insert, delete those info easily or when necessary. Database also acts as storage. Databases are organized by fields, records, and files. A field is a single piece of information; a record is one complete set of fields; and a file is a collection of records. For example, a telephone book is analogous to a file. It contains a list of records, each of which consists of three fields: name, address, and telephone number. A database management system (DBMS) is a collection of programs that enables you to store, modify, and extract information from a database. Relational Database Management System is a type of database management system (DBMS) that stores data in the form of related tables. By: Noor Hossin Web: [email protected] Page: 54

55 Types of Database: In the real world we ll work in RDBMS. Most common Relational Database Management Systems (RDBMS) are as follows: 1. Oracle (the largest DB in the world) 2. MS SQL Server (the second largest) 3. MySQL 4. Sybase 5. DB2 6. Informix 7. MS Access (for relatively smaller company with 50, 100 employees) How to Connect to the Database from UFT? UFT doesn't provide any built-in support to connect to database. UFT Interacts with database creating an instance of ADODB object using ADO. ADO is a Microsoft technology and stands for ActiveX Data Objects and is a programming interface to interact and access data from a database. ADODB Properties: ADODB has 4 properties or methods with which we will be able to work with the databases. ADODB.Connection - Used to establish a connection to the Database. ADODB.Command - Used to execute a SQL command (Queries or Stored Procedures). ADODB.Fields - Used to fetch a particular column from a record set after executing a query/stored proc. ADODB.Recordset - Used to fetch data from a database. Connection Strings: Databases can be connected using Connection strings. Each database differs the way we connect to the them; however the connection strings can be building with the help of Before a database can be accessed by UFT, an object for database connection has to be established. Set adocon = CreateObject("Adodb.connection") Once the object is created, we need to set connection string to connect to the database. We can define a connection string with details of database including database provider, database, and user credentials for access. Steps to Connect Database: Step 1: Creating ADO objects for working with any kind of database. Step 2: Opening the database connection. Step 3: Sending the SQL command like select /delete/update. Step 4: Using Recordset object receiving the values from database until End of file (EOF). Step 5: Closing the connection opened before and destroying the ADO objects to free the memory occupied by these objects. QTP Scripts for Connecting to MS Access: By: Noor Hossin Web: [email protected] Page: 55

56 Option Explicit Dim con,rs Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.open "Driver = {Microsoft Access Driver (*.mdb)}; Dbq = C:\mydatabase.mdb;Uid=Admin;Pwd=;" rs.open "select * from emp",con Do while not rs.eof VbWindow("Form1").VbEdit("val1").Set rs.fields("v1") VbWindow("Form1").VbEdit("val2").Set rs.fields("v2") VbWindow("Form1").VbButton("ADD").Click rs.movenext Loop 'Release objects'release objects Set rs= nothing Set con= nothing QTP Script for connecting to SqlServer: Option Explicit Dim con,rs Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.open"driver={sql Server};server=MySqlServer;uid=MyUserName;pwd=MyPassword;database=pubs" rs.open "select * from emp",con Do while not rs.eof VbWindow("Form1").VbEdit("val1").Set rs.fields("v1") VbWindow("Form1").VbEdit("val2").Set rs.fields("v2") VbWindow("Form1").VbButton("ADD").Click rs.movenext Loop 'Release objects'release objects Set rs= nothing Set con= nothing QTP Script for Connecting to Oracle: Option Explicit Dim con,rs Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.open "Driver={Microsoft ODBC for Oracle};Server=QTPWorld; Uid=your_username;Pwd=your_password;" rs.open "select * from emp",con Do while not rs.eof VbWindow("Form1").VbEdit("val1").Set rs.fields("v1") VbWindow("Form1").VbEdit("val2").Set rs.fields("v2") VbWindow("Form1").VbButton("ADD").Click rs.movenext Loop 'Release objects Set rs= nothing Set con= nothing QTP Script for Connecting to MySQL: Option Explicit Dim con,rs Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.open"driver={mysql ODBC 3.51 Driver};Server=localhost;Database=myDB;User=Uname;Password=Pwd;Option=3;" rs.open "select * from emp",con Do while not rs.eof VbWindow("Form1").VbEdit("val1").Set rs.fields("v1") By: Noor Hossin Web: [email protected] Page: 56

57 VbWindow("Form1").VbEdit("val2").Set rs.fields("v2") VbWindow("Form1").VbButton("ADD").Click rs.movenext Loop 'Release objects Set rs= nothing Set con= nothing QTP Script for Connecting to Excel: Option Explicit Dim con,rs Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.open "DRIVER={Microsoft Excel Driver (*.xls)};dbq=c:\teststatus.xls;readonly=true" rs.open "SELECT count(*) FROM [Status$] where Status = 'Failed' ",con Msgbox rs(0) 'Release objects Set rs= nothing Set con= nothing QTP Script for Connecting to Sybase: Option Explicit Dim con,rs Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") ' Open a session to the database con.open"driver={sybase SYSTEM 11};Srvr=myServerAddress;Uid=Uname;Pwd=Pwd;Database=myDataBase;" rs.open "select * from emp",con Do while not rs.eof VbWindow("Form1").VbEdit("val1").Set rs.fields("v1") VbWindow("Form1").VbEdit("val2").Set rs.fields("v2") VbWindow("Form1").VbButton("ADD").Click rs.movenext Loop 'Release objects Set rs= nothing Set con= nothing Creating Database Checkpoints Database checkpoint is one of the checkpoints in UFT which is used to test the contents of the database accessed by application under test. It stores the expected data and compares this with the data stored in the database. When you use a database checkpoint in your script, it connects to the database and sends the query to the database to retrieve the current data into the record set. UFT now compares the current data with the expected data stored in the checkpoint and gives you the result as pass or fail. You can create a database checkpoint to confirm that the data being stored in the database does not introduce any error and you can do this by verifying: The data is saved to the correct tables and in proper field. The data on different operation in database like insert, delete, update. The correctness of data etc. To create a database checkpoint in QTP following steps should be followed Insert statements to update the record in your Script. By: Noor Hossin Web: [email protected] Page: 57

58 1. Go to Design > Checkpoint > Database Checkpoint. You will see a database query wizard. 2. Select either of the two options there Create query using Microsoft query Select this if you want to use Microsoft query. Specify SQL statement manually Select this to manually provide the sql query to the database. We will use and go with this option now. Click Next once you selected the query definition. 3. Click Create button, which will open the data source window, Select Machine Data Source and click new. 4. Create New Data Source window opens, Select the type of data source and click Next. 5. Select the Driver depending on the database type from the list. For example if your database is SQL select 'SQL Server', for Oracle select 'Microsoft ODBC for Oracle' and follow the onscreen wizard with the details of your database like server name database name etc. Finally Test the connection and press 'OK' 6. You will see the data source name just created in the list at Machine Data source. Select and Click 'OK' 7. Specify your sql query e.g. for above mentioned example 'Select Customer_Name from Orders'. Click Finish 8. It will Open the Database Checkpoint Properties, modify your checkpoint settings, and enter the expected data and Click 'OK' It will add a line in the expert view as: DbTable("DbTable").Check CheckPoint("DbTable") 9.4 Read/Write data from excel sheet using UFT To read/write data from the entire Excel file, use the following steps: 1. Create an excel object. 2. Create a workbook object that takes file path as input. 3. Create a sheet name object that takes sheet name as input. 4. Access the cell to write/read the data and perform operations on sheet. 5. Save excel workbooks. 6. Close excel workbooks. 7. Quit excel application. 8. Destroy objects defined above. You can simply access the excel sheet to read data by using the below script. Set objexcel=createobject("excel.application") Set objworkbook=objexcel.workbooks.open("e:\docs\data.xlsx") objexcel.visible=true Set objsheet=objworkbook.worksheets("sheet1") 'Then just access the cell: Row=objSheet.UsedRange.Rows.Count Col=objSheet.UsedRange.Columns.Count 'To read the data from the entire Excel file For i= 1 to Row For j=1 to Col Msgbox objsheet.cells(i,j).value 'Get the max row 'Get the max column To read single value: objsheet.cells(2,"a").value By: Noor Hossin Web: [email protected] Page: 58

59 Next Next objworkbook.save objworkbook.close objexcel.quit Set objsheet=nothing Set objworkbook=nothing Set objexcel=nothing Data Table in QTP The Data Table representing the data with rows and columns has the characteristics of a Microsoft Excel spreadsheet that you can store and use data in its cells. Data table will help you in parameterize your test. To view data table Go to View > Data Table. You can use the DataTable, DTSheet and DTParameter utility objects to manipulate the data in any cell in the Data Table. For that you need to follow specific methods and properties to insert or retrieve data from DtSheets. Types of Data Tables: There are two types of Datatables: 1. Global sheet 2. Local sheet Local Data Table: Each action has its own private data table also known as local data table which is can also be accessed across actions. Global Data Table: Each test has one global data sheet that is accessible across actions. Global sheet is available to all actions in the test and local sheet is available to the corresponding action. Windows Excel UFT Datatable Excel Application Excel Sheet Columns Rows & Values Datatable DtSheet DtParameter Value & Valuebyrow Working with External Databases Add Sheet: Adds the specified sheet to the run time data table. DataTable.AddSheet("My Sheet") DeleteSheet: Deletes the specified sheet from the run time data table. DataTable.DeleteSheet "My Sheet" Export: Exports the complete data table to the specified path. DataTable.Export("C:\abc.xls") ExportSheet: Exports the current sheet to the specified path. By: Noor Hossin Web: [email protected] Page: 59

60 DataTable.ExportSheet "C:\abc.xls",1 GetCurrentRow (for global sheet): Retrieves the current row number of the global data sheet. Row=DataTable.GetCurrentRow Reporter.ReportEvent 1, "Row Number", row GetRowCount (for global sheet): Retrieves the number of rows in the longest column in the first sheet(global data sheet) in the run time data table. Rowcount=DataTable.Get Sheet("My Sheet").GetRowCount Reporter.ReportEvent 2, "There are" &rowcount, "rows in the data sheet" GetSheet: Retrieves the specified sheet in the run time data table. DataTable.Getsheet("My Sheet").AddParameter("Time","08:00") GetSheetCount: Retrieves the total number of sheets in the run time data table. Sheetcount=DataTable.GetSheetCount Reporter.ReportEvent 0, "sheet number", "There are" &sheetcount "sheets in data table" Import: Import the specified Microsoft Excel file to the run time data table. DataTable.Import("C:\abc.xls") ImportSheet: Imports the specified sheet of Microsoft Excel file to the run time data table. DataTable.ImportSheet"C:\abc.xls", 1, "Name" SetCurrentRow: Sets the specified row as the current (active) row in the run time data table. DataTable.SetCurrentRow(2) SetNextRow: Sets the row next to the current row as the new current row in the run time data table sheet. DataTable.GetSheet("My Sheet").SetNextRow SetPrevRow: Sets the row above the current row as the new current row in the run time data table sheet. DataTable.SetPrevRow DataTable Object - Properties: Returns the first sheet in the datat table. DataTable.GlobalSheet.AddParameter "Time","08:00" LocalSheet Property: Returns the current (active) sheet of the data table. MyParam=DataTable.LocalSheet.AddParameter "Time","09:00" RawValue Property: Returns the raw value of the cell in the specified parameter of the current row of the data table. The raw value is the actual string written in the cell before the cell is computed, such as the actual text from a formula. FormulaVal=DataTable.RawValue("Date","ActionA") Value Property: Data table default property. Retrieves or sets the value of the cell in specified parameter and the current row of the data table. DataTable.Value(2, 3) ="New York" DTParameter - Methods DtSheet.AddParameter: Adds a new column. DataTable.GetSheet("dtGlobalSheet").AddParameter "NewColumnName","FirstRowVaule" DtSheet.GetParameter: Retrieves the specified parameter from the run time data table sheet. DataTable.GetSheet("My Sheet").GetParameter("Destination") By: Noor Hossin Web: [email protected] Page: 60

61 DtParameter Properties Name Property: Retrieves the name of the parameter in run time data table. ParamName=DataTable.LocalSheet.AddParameter("NewColumnName","Row1Value" ).Name RawValue Property: The raw value of the cell in the current row of the parameter in the run time data table. The raw value is the actual string written in the cell before the cell is computed, such as the actual text from a formula. The following example uses the RawValue property to find the formula used in current row of the Date column in the ActionA sheet of the run time data table. The statement below runs the Value:=Now() FormulaVal=DataTable.GetSheet("ActionA").GetParameter("Date").RawValue Value Property: Parameter default property. Retrieves or sets the value of cell in the current row of parameter in the run time data table. DataTable.GetSheet("ActionA").GetParameter("Destination").Value="New York" ValueByRow Property: Retrieves the value of the cell in the specified row of the parameter in the run time data table. DataTable.GetSheet("ActionA").GetParameter("Destination").ValueByRow(4) DTSheet Methods AddParameter Method: Add the specific parameter(column) to the sheet in Run Time data table, sets the value of the first row to the specified value, and returns the parameter so that you can directly set or retrieve properties of new parameter in same statement. Variable=DataTable.AddSheet("My Sheet").AddParameter("Time","08:00") DeleteParameter Method: Deletes the specified parameter from the sheet in run time data table. DataTable.GetSheet("My Sheet").DeleteParameter("Time") GetCurrentRow Method: Returns the row number of the current(active) row in the run time data table sheet. Rownum=DataTable.GetSheet("My Sheet").GetCurrentRow Reporter.ReportEvent 1, "Row Number", rownum GetParameter Method: Returns the specified parameter from the run time data table sheet. DataTable.GetSheet("My Sheet").GetParameter GetParameterCount Method: Returns the total number of parameters(columns) from the run time data table sheet. Paramcount=DataTable.GetSheet("My Sheet").GetParameterCount Reporter.ReportEvent 2, "There are", &paramcount, "columns in this sheet" GetRowCount Method: Returns the total number of rows in the longest column in the run time data table sheet. rowcount=datatable.getsheet("my Sheet").GetRowCount Reporter.ReportEvent 2, "There are", &rowcount, "active rows in this sheet" SetCurrentRow Method: Sets the specified row as the current row in the run time data table sheet. DataTable.GetSheet("My Sheet").SetCurrentRow(2) By: Noor Hossin Web: [email protected] Page: 61

62 SetNextRow Method: Sets the row next to the current row as the new current row in the run time data table sheet. DataTable.GetSheet("My Sheet").SetNextRow SetPrevRow Method: Sets the row above the current row as the new current row in the run time data table sheet. DataTable.GetSheet("My Sheet").SetPrevRow DTSheet Properties: Returns the name of the run time data table sheet. Sheetname=DataTable.LocalSheet.Name Reporter.ReportEvent 1, "The active sheet is", sheetname File Handling Using UFT To interact with text files in UFT use FSO object. Interaction can be in the form of reading input from a file, writing output to a file, appending to a file. FSO stands for File System Object. FileSystemObject is an object model which is used to handle the drives, folders, and files of a system or server. The FSO Object Model has a rich set of properties, methods and events to process folders and files. How to Write Data to Text File in UFT? First create a FSO object using CreateObject and then create a text file using CreateTextFile. Below code will write data to text file in QTP. content="write data to text file in QTP" Set fso=createobject("scripting.filesystemobject") Set file=fso.createtextfile("e:\docs\filecreateqtp.txt",8,true) 'open in write mode file.write(content) ' write content in file file.close Set file=nothing Set fso=nothing Set file= fso.createtextfile("file_location", ForWriting, True) 1 st argument for file location. 2nd argument ForReading, ForWriting, ForAppending. 3rd argument is "True" if new file has to be created if the specified file doesn't exist else false, blank signifying false. How to Read Content from a File? Use ReadLine() method. Below code will read data from text file in QTP. Set fso=createobject("scripting.filesystemobject") Set file= fso.opentextfile("e:\docs\filecreateqtp.txt",1,true) Do while file.atendofstream <> true Msgbox file.readline Loop file.close Set file=nothing Set fso=nothing How to Delete File? Use DeleteFile() method to delete a file from a particular location. Below code will delete file: Set fso=createobject("scripting.filesystemobject") fso.deletefile("e:\docs\filecreateqtp.txt") By: Noor Hossin Web: [email protected] Page: 62

63 Set file=nothing Set fso=nothing FSO Model Properties: File: CreateTextFile: Creates a specified file name and returns a TextStream object that can be used to read from or write to the file. Syntax: Set objfile = fso.createtextfile(filename[, overwrite[, Unicode]]) FileExists: Determines whether or not a specified file exists. Syntax: fso.fileexists (filespec) Close: Closes an open TextStream file. Syntax: objtso.close Read: Reads a specified number of characters from a TextStream file and returns the resulting string. Syntax: strchars = objfile.read(numcharacters) ReadAll: Reads the entire TextStream file and returns the resulting string. Syntax: strchars = objfile.readall ReadLine: Reads an entire line (up to, but not including, the newline character) from a TextStream file and returns the resulting string. Syntax: strchars = objfile.readline Write: Writes a specified string to a TextStream file. Syntax: objfile.write(string) WriteLine: Writes a specified string and newline character to a TextStream file. Syntax: objfile.writeline([string]) WriteBlankLines: Writes a specified number of newline characters to a TextStream file. Syntax: objfile.writeblanklines(numlines) AtEndOfLine: Indicates whether the file pointer is positioned immediately before the end-of-line marker in a TextStream file. Syntax: objfile.atendofline AtEndOfStream: Indicates whether the file pointer is positioned at the end of a TextStream file. Syntax: objfile.atendofstream DeleteFile: Deletes a specified file. Syntax: fso.deletefile (filename[, force]) CopyFile: Copies one or more files from one location to a new location. Syntax: fso.copyfile (source, destination[, overwrite]) GetFile: Returns a File object corresponding to the file in the specified path. The file object methods and properties can be accessed. Syntax: objfile = fso.getfile(filespec) Folder and Drive: By: Noor Hossin Web: [email protected] Page: 63

64 CreateFolder: Creates a new folder in the specified location. Syntax: fso.createfolder(foldername) FolderExists: Determines whether or not a specified folder exists. Syntax: fso.folderexists (folderspec) DeleteFolder: Deletes the specified folder and its contents. Syntax: fso.deletefolder (folderspec[, force]) MoveFolder: Moves one or more folders from one location to another. Syntax: fso.movefolder (source, destination) CopyFolder: Copies a folder to a new location. Syntax: fso.copyfolder (source, destination[, overwrite]) GetDrive: Returns a Drive object corresponding to the drive for a specified path. Syntax: objdrv = fso.getdrive(drivespec) GetFolder: Returns a Folder object corresponding to the folder in a specified path. Syntax: objfolder = fso.getfolder(folderspec) DriveExists: Determines whether or not a specified drive exists. Syntax: fso.driveexists (drivespec) ************************************************************ CH-10: Advanced Object Identification If UFT is unable to identify the object by using all of its properties, then use Advanced Object Identification method like XPath, CSS, Web Table, Child Objects, and HTML DOM etc When to use Advanced Object Identification UFT's object identification concept is based on 4 types of properties. Types of properties: 1. Mandatory properties 2. Assistive properties 3. Base Filter properties 4. Optional Filter properties A test engineer can specify list of mandatory properties, assistive properties, base filter properties, optional filter properties and ordinal identifier. If UFT is unable to identify the object by using all of this properties then use Advanced Object Identification methods. Such as XPath CSS Web Table Child Objects HTML DOM By: Noor Hossin Web: [email protected] Page: 64

65 UFT GetROproperty and GetTOproperty Test Object: Whatever you see in your Object Repository is called Test Object. A Test Object uses a description object to store the properties and their respective values as recorded in design time. For example - WebEdit, WebButton etc. TO property set created and maintained by QT, captured from AUT during recording. Uses stored TO properties to identify AUT objects during test run. Access TO properties using GetTOProperty. Access TO methods directly. RunTime Object: An actual object located in your Application is called RunTime Object. You can not modify RunTime Object. RO property set created and maintained by AUT. Access runtime property values (runtime value of property defined by QT) using.getroproperty. Access native object properties using.object. Access native object methods using.object. QTP identifies run-time objects based on TO properties whose values are compared with the RO values. GetROProperty - Returns the current value of the specified identification property from the object in the application. MsgBox Browser(":: PeopleNTech, LLC. ::").Page(":: PeopleNTech, LLC. ::").WebEdit("user").GetROProperty("html tag") If you want to modify runtime properties use SetTOProerty. SetTOProperty (Property, Value) - Set the value of the specified identification property in the test object description. GetTOProperty - Returns the value of the specified identification property from the Test object description. MsgBox Browser(":: PeopleNTech, LLC. ::").Page(":: PeopleNTech, LLC. ::").WebEdit("user").GetTOProperty("name") MsgBox Browser(":: PeopleNTech, LLC. ::").Page(":: PeopleNTech, LLC. ::").WebEdit("user").GetTOProperty("html tag") GetTOProperties - Returns Collection of Properties & Values used to identify object. Similar to array. Set ObjCollection=Browser(":: PeopleNTech, LLC. ::").Page(":: PeopleNTech, LLC. ::").WebEdit("user").GetTOProperties MsgBox ObjCollection.Count For i = 0 To ObjCollection.Count-1 Step 1 MsgBox ObjCollection(i).Name MsgBox ObjCollection(i).Value Next By: Noor Hossin Web: [email protected] Page: 65

66 Object Identification Using- XPath, CSS, Web Table, Child Objects, HTML DOM Advanced Object Identification methods are XPath, CSS, Web Table, Child Objects, and HTML DOM etc. XPath XPath (XML Path) is a language used to define the structure of elements in XML documents. XPath is used for locating nodes in an XML document and it can also be used for locating HTML elements in XHTML. XPath uses path expressions to navigate and identify the element in the xml document. Advantages of Xpath: Enhances Performance (time spent in comparing multiple properties is saved). Opens up all sorts of new possibilities for locating complex & dynamically rendered elements. Identify any object in the application easily without looking for a combination of properties to make it unique. Powerful selection of the DOM. Disadvantages of Xpath: No native support for xpath in IE. Types of Xpath: Location path specifies the location of node in XML document. This path can be absolute or relative. So there are two types of Xpath as follows: 1. Absolute Xpath: If your location path starts with the root node or / (forward slash) then it is an absolute path and your location path begins from the root node. Start selection from the document node Starts with / For Example, Google Search Box : /html/body/div[1]/div[2]/div[1]/div[1]/div[3]/div/div/div/form/fieldset[2] /div/div/div 2. Relative Xpath: A relative location path is one where the path starts from the node that we've selected. It doesn't need to start from the root node. This can reduce the amount of code you need to write - especially if you need to select many nodes that share the same name. Start selection matching anywhere in the document Starts with // For Example, Google Search Box : //*[@id='gbqfqwb'] How to Get Xpath? There is no native support for xpath in IE. You must use Firefox and Google Chrome browser to get the Xpath. Steps Using Firefox: 1. Install Firebug add-ons; install FirePath add-on, and Restart Firefox. 2. Open the website you are working on. By: Noor Hossin Web: [email protected] Page: 66

67 3. Activate Firebug by hitting F12, which will open Firebug window at bottom of screen. 4. Then click on "FirePath" all the way to the right on the Firebug toolbar. 5. From the same toolbar click 2nd button (Square and pointer icon on the right of Firebug icon). 6. Now hover over different elements of you website and it will show you their xpath values. Click on the element you need xpath value for. 7. Copy the xpath value and use in your automation script. Steps Using Google Chrome: 1. Open the website you are working on. 2. Activate Inspect Element by hitting Ctrl+Shift+I or Right click on the Object, which will open Inspect Element window at bottom of screen. 3. Right click on the selected Object and click on Copy Xpath. 4. Copy the xpath value and use in your automation script. Xpath Example: SystemUtil.Run "iexplore.exe"," "qtp" [1]").Click XPath Syntax: In XPath, there are seven kinds of nodes: Element, Attribute, Text, Namespace, Processing-instruction, Comment, and Document Nodes. XML documents are treated as trees of nodes. The topmost element of the tree is called the root element. Expression Description / Selects from the root node // Selects nodes in the document from the current node that match the selection no matter where they are * Matches any Matches any attribute Node Selects attributes Selects multiple X-Paths XPath is an important Web Object Identifier introduced in QTP 11. It is one of the widely used identification strategy in open source tools. CSS Path CSS (Cascading Style Sheet) is a language used for formatting and rendering of elements in HTML and XML documents. You can define a CSS identification property value for a test object to help identify a Web object in your application based on its CSS definition. CSS contains the styling information of objects. CSS uses Selectors for binding style properties to elements in the document. These Selectors can be used by UFT as object identification strategy. By: Noor Hossin Web: [email protected] Page: 67

68 For Example, SystemUtil.Run "iexplore.exe"," Browser("title:=.*").page("title:=.*").WebEdit("css:=#lst-ib").Set "qtp" Browser("title:=.*").page("title:=.*").WebButton("css:=#tsf > div.tsf-p > div.jsb > center > input[type='submit']:nth-child(1)").click Pro's: CSS is faster, looks simpler, and more reliable. Consistent support across browsers. Con's: Need to get designers on board. Tests may need to be updated with UI changes. Web Table Web Tables are one of the primary design tools for HTML documents. Web Tables allow for greater control over page layout, allowing creation of more visually interesting pages. Tables are also used to set apart sections of documents, such as in sidebars, navigation bars, or framing images and their titles and captions. WebTable class provides various methods to work on web table. Most of the times Tables inside web pages are implemented without any name or id attributes. This makes it difficult for Automation engineer to create robust scripts for identifying the Table correctly at run-time. UFT by default uses the "index" ordinal identifier to recognize a WebTable. Methods of WebTable: html id - If the table has an id tag then it is best to make use of this property. InnerText - Heading of the Table. SourceIndex - Fetches the Source Index of the Table. ChildItem - Returns a test object from the cell by type and index. Set ChildItem = Browser("BrowserName").Page("PageName").WebTable("html tag:=table").childitem(2,1,"webcheckbox",0) ChildItem.Click We have to pass row number, column number, Object type and Index(optional) ChildItemCount - Gets the number of Child Items present in specified Row. ChildItemCount=Browser("Browser").Page("Page").WebTable("html tag:=table").childitemcount(2,1,"webcheckbox") Msgbox ChildItemCount ChildObjects - Returns the collection of Child Objects Contained within the Object. Set ChildObject = Browser("Browser").Page("Page").WebTable("html tag:=table").childobjects Msgbox ChildObject.Count For i=1 to ChildObject.Count msgbox i&" "& ChildObject(i).GetRoProperty("name") Next RowCount - Gets the number of Rows in the Table. RowCount=Browser("Browser").Page("Page").WebTable("html tag:=table").rowcount Msgbox RowCount ColumnCount - Gets the number of Columns in the Table. We need to pass rownumber to know the column count. ColumnCount = Browser("Browser").Page("Page").WebTable("html tag:=table").columncount(2) By: Noor Hossin Web: [email protected] Page: 68

69 Msgbox ColumnCount GetCellData - Gets the Value of the Cell based on the column and Row Index. CellData = Browser("Browser").Page("Page").WebTable("html tag:=table").getcelldata(1,1) Msgbox CellData GetRowWithCellText - Returns the number of the first row found that contains a cell with the specified text. GetRowWithCellText = Browser("Browser").Page("Page").WebTable("html tag:=table").getrowwithcelltext("hello") Msgbox GetRowWithCellText WebTable Test Script: SystemUtil.Run "iexplore.exe"," Set BrowserWebTable=Browser("title:=.*").Page("title:=.*").WebTable("html tag:=table","class:=reference") rowcount=browserwebtable.rowcount colcount=browserwebtable.columncount(2) Print "Total Row: " &rowcount Print "Total Column: " &colcount r1c1=browserwebtable.getcelldata(1,1) r1c2=browserwebtable.getcelldata(1,2) r1c3=browserwebtable.getcelldata(1,3) r1c4=browserwebtable.getcelldata(1,4) r2c1=browserwebtable.getcelldata(2,1) r2c2=browserwebtable.getcelldata(2,2) r2c3=browserwebtable.getcelldata(2,3) r2c4=browserwebtable.getcelldata(2,4) r3c1=browserwebtable.getcelldata(3,1) r3c2=browserwebtable.getcelldata(3,2) r3c3=browserwebtable.getcelldata(3,3) r3c4=browserwebtable.getcelldata(3,4) r4c1=browserwebtable.getcelldata(4,1) r4c2=browserwebtable.getcelldata(4,2) r4c3=browserwebtable.getcelldata(4,3) r4c4=browserwebtable.getcelldata(4,4) r5c1=browserwebtable.getcelldata(5,1) r5c2=browserwebtable.getcelldata(5,2) r5c3=browserwebtable.getcelldata(5,3) r5c4=browserwebtable.getcelldata(5,4) Set excel=createobject("excel.application") Set wb=excel.workbooks.open("e:\uft\myscript\webtable\testdata\webtabledata.xlsx") Set ws=wb.worksheets("sheet1") excel.visible=true ws.cells(1,1)=r1c1 ws.cells(1,2)=r1c2 ws.cells(1,3)=r1c3 ws.cells(1,4)=r1c4 ws.cells(2,1)=r2c1 ws.cells(2,2)=r2c2 ws.cells(2,3)=r2c3 ws.cells(2,4)=r2c4 By: Noor Hossin Web: [email protected] Page: 69

70 ws.cells(3,1)=r3c1 ws.cells(3,2)=r3c2 ws.cells(3,3)=r3c3 ws.cells(3,4)=r3c4 ws.cells(4,1)=r4c1 ws.cells(4,2)=r4c2 ws.cells(4,3)=r4c3 ws.cells(4,4)=r4c4 ws.cells(5,1)=r5c1 ws.cells(5,2)=r5c2 ws.cells(5,3)=r5c3 ws.cells(5,4)=r5c4 wb.save wb.close excel.quit Set ws=nothing Set wb=nothing Set excel=nothing Child Objects The ChildObjects method is used to create object collections using a parent object. Set ColObject = ParentObject.ChildObjects(oDesc) When executed, it will hold a collection of objects which have the same properties as the description object. The collection can be as small as 0 and as large as the total number of objects in the AUT. Methods of Child Object: SystemUtil.Run "iexplore.exe"," 'Display the count of the opening Browser/Window Collection: Set odesc=description.create odesc("micclass").value="browser" Set obrowser=desktop.childobjects(odesc) Print obrowser.count For i = 0 To obrowser.count-1 Step 1 Print obrowser(i).getroproperty("title") Next 'Display the count of the links present in the application landing page: Set chlink=description.create chlink("micclass").value="link" Set totlink=browser("title:=.*").page("title:=.*").childobjects(chlink) Print totlink.count For i = 0 To totlink.count-1 Step 1 Print totlink(i).getroproperty("innertext") Next 'Display the count of the Web buttons present in the application landing page: Set button=description.create button("micclass").value="webbutton" Set totbutton=browser("title:=.*").page("title:=.*").childobjects(button) Print totbutton.count For i = 0 To totbutton.count-1 Step 1 Print totbutton(i).getroproperty("value") Next 'Display the count of the Web Edit present in the application landing page: By: Noor Hossin Web: [email protected] Page: 70

71 Set webeditset=description.create webeditset("micclass").value="webedit" Set webeditcount=browser("title:=.*").page("title:=.*").childobjects(webeditset) Print webeditcount.count For i = 0 To webeditcount.count-1 Step 1 Print webeditcount(i).getroproperty("value") Next HTML DOM HTML DOM is a platform and language independent model for representing and interacting with objects in HTML or XML and related formats. It defines the structure for HTML and help in traversing through objects in HTML. This approach can be useful in case UFT does not able to identify the object. The HTML DOM defines the objects and properties of all HTML elements, and the methods (interface) to access them. UFT provides direct access to the Internet Explorer Document Object Model (DOM) through which you can access the HTML tags directly. Access to the DOM is performed using the.object notation. With DOM, UFT can access the Source of a Webpage. When can we use DOM? If UFT Webtable checkpoint doesn't show the desired content in a cell. If you want to access all the HTML tags used in a webpage. HTML DOM Methods: HTML DOM has many method and properties associated with it like getelementbyid, GetElementsbyTagName etc. To access these methods you must create the DOM object first. Syntax to create a DOM object: Set domobject = Browser("title:=.*").Page("title:=.*").Object getelementbyid - Returns a reference to the first object with the specified value of the ID attribute. 'Set the value of objid to the first element in the page that has an ID of "mark": Set objid = Browser("Browser").Page("Yahoo!").Object.getElementByID("mark") 'Set value in webedit using element's ID: Browser("name:=Google").Page("title:=Google").Object.getElementByID("XXXX").Value="QTP" getelementsbyname - Retrieves a collection of objects based on the value of the NAME attribute. Set obj= Browser("name:=Google").Page("title:=Google").Object.getElementsByTagName("INPUT") For i=0 to obj.length-1 If obj(i).name="q" and obj(i).type="text" Then 'Sets value in web edit using element's name. Browser("name:=Google").Page("title:=Google").Object.getElementsByName(obj(i).Name)(0).Value ="QTP" End If Next getelementsbytagname - Retrieves a collection of objects based on the specified element name. Set BrowserParent = Browser("Mortgage Calculator").Page("Mortgage Calculator") By: Noor Hossin Web: [email protected] Page: 71

72 Set obj = BrowserParent.Object.getElementsByTagName("input") For i=0 to obj.length-1 If obj(i).name="param" and obj(i).type="text" Then obj(i).value="qtp" End If Next Some More Examples: 1. Find the src of the images in the Webtable. Set img = Browser("Browser").Page("Page").WebTable("Happy").Object.all.tags("img") msgbox img.length For i=0 to img.length-1 msgbox img(i).src Next 2. Find the column count in a Webtable. Set col=browser("browser").page("page").webtable("happy").object.cols msgbox col.count 3. Collection of all table rows using HTML DOM in UFT. Set tableobj = Browser("abc").Page("mypage").WebTable("mytable").Object Set trtags = tableobj.getelementsbytagname("tr") print trtags.length 4. Value inside table cell Using HTML DOM. Set tdtags =Browser("abc").Page("mypage").WebTable("mytable").Object.getElementsByTagName("TD") Print tdtags(0).innertext 'print the text displayed inside first td tag in table 5. Collection of all TD elements of the table using HTML DOM. Set tdtags =Browser("abc").Page("mypage").WebTable("mytable").Object.getElementsByTagName("TD") 6. Collection of all TH (table header cells) elements of the table using HTML DOM in QTP? Set thtags = Browser("abc").Page("mypage").WebTable("mytable").Object.getElementsByTagName("TH") 7. Value of attribute of any element using HTML DOM. Set myobj = Browser("abc").Page("mypage").WebTable("mytable").Object Print myobj.getattribute("class") 'This will print the value of class attribute of myobj - table Test Script: Sign In Gmail Account Using HTML DOM. SystemUtil.Run "iexplore.exe"," Wait 2 Set GmailObj=Browser("title:=.*").Page("title:=.*").Object GmailObj.getElementByID("gmail-sign-in").Click Set GmailObjTagName=Browser("title:=.*").Page("title:=.*").Object.getElementsByTagName("INPUT") Print GmailObjTagName.Length For i = 0 To GmailObjTagName.Length-1 Step 1 If GmailObjTagName(i).Name=" " and GmailObjTagName(i).Type=" " Then Browser("title:=.*").Page("title:=.*").Object.getElementsByName(GmailObjTagName(i).Name)(0).Va lue="[email protected]" End If Next Set ObjTagName=Browser("title:=.*").Page("title:=.*").Object.getElementsByTagName("INPUT") For i = 0 To ObjTagName.Length-1 Step 1 By: Noor Hossin Web: [email protected] Page: 72

73 If ObjTagName(i).Name="Passwd" and ObjTagName(i).Type="password" Then ObjTagName(i).Value="almuft12" End If Next Set SignObj=Browser("title:=.*").Page("title:=.*").Object SignObj.getElementByID("signIn").Click Web Frame Frame is just like a container where few elements can be grouped. IFrame is concept of web applications, where different fields are group together in specific frame. UFT identifies such frames in web application as Browser("title:=.*").Page("title:=.*").Frame(Frame) hierarchy. Handling of creation of frame object while recording, it can be customized from Tools > Options > GUI Testing > Web > Page/Frame Options You will not find much difficulty while working with frames. To get the child frames of page using Descriptive Programming, you can write a code like: Set objdesc=description.create objdesc("micclass").value="frame" objdesc("html id").value="iframe" Set objframes=browser("title:=.*").page("title:=.*").childobjects(objdesc) You can add still more properties to identity Frame2 disgustingly Set objframes=browser("title:=.*").page("title:=.*").frame(frame1).childobjects(objdesc) For i=0 to objframes.count If objframes(i).getroproperty("name")= "yourwebbutton_name" objframes(i).click End If Next If you Index value of webbutton you can go for Index property inside the GETROPROPERTY function. Identification of a Frame: There are different ways to know if the element is present inside a frame or not. 1. Right click on the element. Check if "This Frame" option is available. If This frame option is available, it means that the element is inside a frame. 2. View page source of the web page and check if any tag is available for 'iframe' Regular Expressions A Regular Expression is a string that can match one or more expression or values. Regular expressions are used when the objects value is dynamically changed. A regular expression is a string that specifies a complex search phrase. By using special characters such as a period (.), asterisk (*), caret (^), and brackets ([ ]), etc. you define the conditions of the search. When to Use? By: Noor Hossin Web: [email protected] Page: 73

74 Regular Expressions can be used in UFT in cases where the user needs to identify objects where part of the object property remains constant & the remaining part changes frequently. Regular Expressions enable UFT to identify objects and text strings with varying values. We can use regular expressions in UFT when, Defining Properties of an Object. Verifying data using Checkpoints. Parameterize an object property or checkpoint. Steps to Specify Regular Expressions for an object in Object Repository: 1. Navigate to Object Repository: Resources > Object Repository. 2. Select the Object which you want to specify regular expression. 3. In the right side you can observe properties of that object. 4. Select the property which you want to specify regular expression. 5. Click on the property value of that property and the property value is editable. There is a configure button appeared with the symbol "<#>" 6. Click on the configure button or use Ctrl+F11 to open configure window. 7. Select Regular Expression check box. a. If the property value is having any special characters then QTP will display a dialog with asking Do you want to add the backslash (\) before each special character in order to treat it literally? b. If you click on yes QTP will automatically gives the backslash before every special character. So that the special characters will be treated as literal. 8. Now specify the regular expression in constant edit box. Click on OK. 9. Observe that a symbol "A.*" is added in property field. This means, that property is using regular expression. 10. Highlight the object in application to ensure that the provided regular expression is working fine. Use of Regular Expression in UFT You can use regular expressions only for values of type string. By default all properties which you pass from object property are Strings/Constants. When using action parameters to parameterize a check point or an object repository, those action parameters data type must be string type. If you specify any other data type, that will not be treated as regular expression. We can assign property values to variables in UFT when using descriptive programming. When assigning regular expression to any variable make sure that regular expression is in string format. When any special character in a regular expression is preceded by a backslash (\), UFT searches for the literal character. If your searching for a character "*" in a string, then you need to give the pattern as "\*" Example: In the below image, the number of unread mails (3 in this case) will change constantly. But the text Inbox will remain same. By: Noor Hossin Web: [email protected] Page: 74

75 Test Script: SystemUtil.CloseProcessByName "iexplore.exe" '***Regular Expression - Sign In Gmail Account and Click on Inbox***' SystemUtil.Run "iexplore.exe"," Browser("Gmail").Page("Gmail").Link("Sign in with a different").click Browser("Gmail").Page("Sign in - Google Accounts").Link("Add account").click Browser("Gmail").Page("Gmail").WebEdit(" ").Set "uftlab" Browser("Gmail").Page("Gmail").WebEdit("Passwd").Set "almuft12" Browser("Gmail").Page("Gmail").WebButton("Sign in").click 'add regular expression on Resources > Object Repository Browser("Gmail").Page("Inbox (3) - [email protected]").link("inbox (9)").Click Browser("Gmail").Page("Inbox - [email protected]").webelement("webelement").click Browser("Gmail").Page("Inbox - [email protected]").link("sign out").click SendKeys Method In some cases UFT not able to record, identify or run the script for pop-up or an unexpected error in the application. In that case we can automate it using Sendkeys method. Sendkeys( ) method works well with both web based as well as windows based applications. SendKeys methods are used to perform a keyboard operation when certain key is being pressed like ALT+SHIFT or ALT+RETURN or ENTER or TAB keys. You can send a single keystroke or a combination of keys to the active window to perform specific action. To send keystrokes, you would need to instantiate WScript.Shell. How to use the Windows Scripting SendKeys Method? 1. Create a WScript.Shell object. 2. Activate the browser/window in which you want to press the keys. 3. Use the SendKeys method to type the key combination. For Example, If you want to close the notepad then you can do it by sending, Set NotePad = CreateObject("WScript.Shell") SystemUtil.Run "notepad.exe", "", "", "" NotePad.SendKeys "%f" wait 3 NotePad.SendKeys "x" wait 3 Set NotePad = Nothing Keystrokes - Arguments Some keystrokes do not generate characters (such as ENTER and TAB). Some keystrokes represent actions (such as BACKSPACE and BREAK). To send these kinds of keystrokes, send the arguments shown in the following table: By: Noor Hossin Web: [email protected] Page: 75

76 Key Argument BACKSPACE {BACKSPACE}, {BS}, or {BKSP} BREAK {BREAK} CAPS LOCK {CAPSLOCK} DEL or DELETE {DELETE} or {DEL} DOWN ARROW {DOWN} END {END} ENTER {ENTER} or ~ ESC {ESC} HELP {HELP} HOME {HOME} INS or INSERT {INSERT} or {INS} LEFT ARROW {LEFT} NUM LOCK {NUMLOCK} PAGE DOWN {PGDN} PAGE UP {PGUP} PRINT SCREEN {PRTSC} RIGHT ARROW {RIGHT} SCROLL LOCK {SCROLLLOCK} TAB {TAB} UP ARROW {UP} F1, F2..F16 {F1}...{F16} Special Characters: These special characters are not enclosed within a set of braces. SHIFT + CTRL ^ ALT % To specify repeating keys, use the form {key number}. You must put a space between key and number. For example, {TAB 4} means press the TAB key 4 times DeviceReplay Method The DeviceReplay method is used to perform mouse and keyboard actions against screen coordinates that are provided. The Device Replay functions are not automatically recorded, but must be programmed manually in the Expert View. Sometimes Object.Set and Object.Type does not work in UFT for some applications. You can use Mercury DeviceReplay to type Non English symbols and letters even without changing the keyboard layout or installing the special fonts. 1. Create the Device Replay Object. Set DeviceReplay=CreateObject("Mercury.DeviceReplay") 2. Call the desired Device Replay function. DeviceReplay.SendString("Hello, World") 3. When done with the Device Replay object, release it. Set DeviceReplay = Nothing Mouse Functions for Device Replay: All coordinates are relative to the top left corner of the screen. Function Description MouseMove x, y Move the mouse to the screen coordinate By: Noor Hossin Web: [email protected] Page: 76

77 (x, y). MouseClick x, y, button MouseDblClick x, y, button SendString string DragAndDrop x, y, dropx, dropy, button PressKey key MouseDown x, y, button MouseUp x, y, button KeyDown key KeyUp key Move the mouse to the screen coordinate (x,y) and click the button (0=left; 1=middle; 2=right). Move the mouse to the screen coordinate (x,y) and double-click the button (0=left; 1=middle; 2=right). Type a string Drag the mouse from screen coordinate (x,y) to (dropx,dropy) with the button (0=left; 1=middle; 2=right) pressed. Press a key using the ASCII code of the key. For example, Chr(13), vbcr and vbtab. Press the mouse button on screen coordinate (x,y). Release the mouse button on screen coordinate (x,y). Press a key using the ASCII code of the key. For example, Chr(13), vbcr and vbtab. Release a key using the ASCII code of the key. For example, Chr(13), vbcr and vbtab. Example: 'Creating Wscript Shell and Device Replay objects Set WshShell = CreateObject("WScript.Shell") Set obj = CreateObject("Mercury.Devicereplay") x=page("page").webedit("xyz").getroproperty ("abs_x") y=page("page").webedit("xyz").getroproperty ("abs_y") obj.mouseclick x, y, 1 'Clicking Left Mouse button WshShell.sendKeys "{ENTER}" 'Pressing Enter key Set obj=nothing Set WshShell=Nothing Difference between Mercury DeviceReplay and Sendkeys: SendKeys Support only Keyboard Operations SendKeys support limited keyboard operations. SendKeys could be used in VBS script to simulate keyboard inputs with native windows shell commands. DeviceReplay Support Keyboard + Mouse Operations like Drag Drop too. DeviceReplay supports sending multilingual characters and symbols. Mercury.DeviceReplay comes with UFT as a module. By: Noor Hossin Web: [email protected] Page: 77

78 It has no dependency on UFT. Need UFT on the system and only from UFT action you can use it FireEvent Method FireEvent method is used to Triggers an event in an application. When in an application click method is not working, we can use the Fire event method. Syntax: Object.FireEvent EventName, [x], [y], [BUTTON] EventName: Required. A String value. The name of the event to trigger. All events exposed by the Dynamic HTML (DHTML) Object Model are supported. EventName are - onchange, onclick, ondblclick, onblur, onfocus, onmousedown, onmouseup, onmouseover, onmouseout, onsubmit, onreset, onpropertychange. x: Optional. A long integer value. The x-coordinate, relative to the upper-left corner of the object. Default value = y: Optional. A long integer value. The y-coordinate, relative to the upper-left corner of the object. Default value = BUTTON: Optional. A predefined constant or number. The mouse button used to fire the event. Default value = micleftbtn micleftbtn - 0, The left mouse button. micmiddlebtn - 1, The middle mouse button. micrightbtn - 2, The right mouse button. Test Script: 'Using FireEvent Logout from amazon.com RepositoriesCollection.Add "E:\SQA\Docs\Unified Functional Testing\Repository\pom.tsr" SystemUtil.Run "iexplore.exe"," Browser("Amazon.com: Online Shopping").Page("Amazon.com: Online Shopping").WebElement("Sign in").fireevent "onmouseover" Browser("Amazon.com: Online Shopping").Page("Amazon.com: Online Shopping").Link("Sign in").click Browser("Amazon.com: Online Shopping").Page("Amazon.com Sign In").WebEdit(" ").Set "[email protected]" Browser("Amazon.com: Online Shopping").Page("Amazon.com Sign In").WebEdit("password").Set "abcd123" Browser("Amazon.com: Online Shopping").Page("Amazon.com Sign In").WebButton("Sign in using our secure").click Browser("Amazon.com: Online Shopping").Page("Amazon.com: Online Shopping").WebElement("Sign in").fireevent "onmouseover" Browser("Amazon.com: Online Shopping").Page("Amazon.com: Recommended").Link("Not Noor? Sign Out").Click ************************************************************ CH-11: Frameworks A Framework defines a set of guidelines/best practices that enforces a set of standards which makes it easy to use for the end users to work with Introduction to Frameworks TEST Automation Framework: By: Noor Hossin Web: [email protected] Page: 78

79 A set of guidelines like coding standards, test-data handling, object repository treatment which when followed during automation scripting to produce beneficial outcomes like increase code re-usage, higher portability, reduced script maintenance cost. UFT Framework Guidelines: QTP Framework, or in general a test automation framework, is a set of guidelines which you can follow during scripting to achieve the desired results. These set of guidelines can be anything such as - Coding Standards. For example, if there is some code that needs to be re-used multiple numbers of times, then you should create a function for that code and call the function wherever required. Using comments so that the code can be understood easily by anyone. Structure of Your Data Sheets, how your workbooks and the individual sheets in them are grouped together. What Folder Structure You Should Follow to store the test scripts, reusable libraries, objects repositories, and test run results. How Should Test Run Results be Stored and Displayed, whether you want to overwrite the test results every time, or you want to save all the test runs separately. How Different Team Members Should Access that shared repositories, libraries and how they should update these. Features of a Good Automation Framework: Following are some of the important features that should be available in a good automation framework. 1. The framework should be designed in such a way that it helps to achieve maximum possible re-use. For example, if there is some code that needs to be re-used multiple numbers of times, then you should create a function for that code and call the function wherever required. 2. The code should be easy to understand and maintain. 3. All different components such as test cases function libraries, object repositories, data sheets, configuration files and test results are stored in separate folders. 4. Data parameterization is another important feature that should be a part of a good framework. With data parametrization, your test data would be kept separate from the code. And this will ensure that the same code can be re-used for different sets of data. 5. Test Results should make sense and should be easy to understand. You can also provide high level and detailed test results separately. 6. Proper error handling mechanisms should be employed. You can consider providing screenshots of the failed test cases. These screenshots can be used By: Noor Hossin Web: [email protected] Page: 79

80 for defect tracking purposes. 7. When you run the test scripts in batch mode, the framework should have a provision wherein if one test script fails, QTP should report out the error and then move over to execute the next test case. 8. Add the feature for automatically sending an (or SMS) after completion of test script execution. This feature can be configured in such a way that as soon as your batch execution is complete, the framework will automatically send an to all the stakeholders. It would be a good idea to send the test execution result as part of the Benefits of Using Frameworks Following are the some of the major benefits of using Test Automation Frameworks in UFT to consider: Reusability of Test Script. Script s Easy to Maintenance. Readability of Scripts. Good Workable Folder Structure for all the Test Assets. Maximum Coverage. Recovery Scenario. Low Cost Maintenance. Minimal Manual Intervention. Easy Reporting Different Types of Framework There are different types of automation frameworks and the most common ones are listed below: 1. Modular Framework 2. Data Driven Framework 3. Keyword Driven Framework 4. Hybrid Framework 1. Modular Framework Modular Framework is the approach where all the test cases are first analyzed to find out the reusable flows. Then while scripting, all these reusable flows are created as functions and stored in external files and called in the test scripts wherever required. Advantages of Modular Framework: Less Time to create a Test Scripts as the reusable functions need to be created only once. Effort required to create test cases is also lesser due to code reuse. If there are any changes in the reusable functions, the changes need to be done in only a single place. Hence script maintenance is easier. The framework introduces high level of modularization which leads to easier and cost efficient maintenance. The framework is pretty much scalable. Disadvantages of Modular Framework: By: Noor Hossin Web: [email protected] Page: 80

81 Since data is still hardcoded in the script, the same test case cannot be run for multiple data values without changing data after each run. Additional time is spent in analyzing the test cases to identify with reusable flows. Good programming knowledge is required to create and maintain function libraries. 2. Data Driven Framework Data-driven testing is creation of test scripts where test data are read from data files instead of using the same hard-coded values each time the test runs. The test script first connects to the external data source and then extracts the data from that source. This way tester can test how the application handles various inputs effectively. It can be any of the below data files: Datapools Excel files ADO objects CSV files ODBC sources In simple terms, you have to do is to just separate your code and data. Components of Data Driven Framework: In order to create a Data Driven Framework in UFT, you need to have the following components available. Driver/Test Script: Driver Scripts are the actual UFT test scripts. For each scenario that you would automate, you would need to create a separate UFT test script. Object Repository: All the object definitions will be stored in the object repository. You can use descriptive programming approach if you want to avoid using the object repository. Test Data: There will be an external data source that will contain all the test data that you need to run your test script. Advantages of Data Driven Framework: Since the data is kept separate from the test script, the same script can be run multiple times for different sets of data (which can be kept in multiple rows in the data sheet). Changes made in the test data don t affect the test scripts in any way and vice versa. Disadvantages of Data Driven Framework: Additional effort and good technical expertise is required to create functions that connect to the external data sources to retrieve the data. Additional amount of time is required in identifying which external data source to use and deciding how the data should be stored or grouped in that external data source. 3. Keyword Driven Framework By: Noor Hossin Web: [email protected] Page: 81

82 Keyword driven testing is a type of functional automation testing framework which also known as table-driven testing or action word based testing. In Keyword-driven testing we use a table format, usually a spreadsheet, to define keywords or action words for each function that we would like to execute. You can create various keywords and associate a different action or function with each of these keywords. Then you create a Function Library that contains the logic to read the keywords and call the associated action. Types of Keyword Driven Framework: Based upon how keywords are mapped in your framework, you can distinguish the framework in the following 2 ways - 1. Operation Level: Keywords are mapped to the lowest level operation on an object (this operation usually is a single statement). 2. Function Level: Keywords are mapped to a function or action which contains a collection of statements. Components in Keyword Driven Framework: Driver Scripts are the actual UFT test scripts. For each scenario that you would automate, you would need to create a separate UFT test script. Data Table or Excel Sheets which contains the keywords and the steps needed to execute a particular flow or action. A Function Library which contains various functions that read each line from the excel sheet, convert it into QTP readable format and finally execute it. For example, the function library would read the first line from the excel and convert it as: Browser("Hire freelancers and find").page("elance: Please Sign In").WebEdit("lnm").Set "uftlab" Object Repository may or may not be used in this framework. You can use descriptive programming approach if you want to avoid using the object repository. Advantages of Keyword Driven Framework: The keyword and function libraries are completely generic and thus can be reused easily for different applications. All the complexity is added in the function libraries. Once the libraries are ready, it becomes very easy to write the actual test script steps in excel sheets. Enables writing tests in a more abstract manner using this approach. Keyword driven testing allows automation to be started earlier in the SDLC even before a stable build is delivered for testing. There is a high degree of reusability. Disadvantages of Keyword Driven Framework: By: Noor Hossin Web: [email protected] Page: 82

83 Lot of time and effort needs to be spent initially to create the function libraries. Very high programming skills are needed to create the complex keyword library functions. It's not easy for new people to understand the framework quickly. Initial investment in developing the keywords and its related functionalities might take longer. It might act as a restriction to the technically abled testers. 4. Hybrid Framework A Hybrid Framework is a framework that is created by combining together the features of the different types of QTP frameworks such as modular framework, data driven framework, and keyword driven framework. You can call your Hybrid Framework as - A hybrid framework based on functional and data driven approach. A keyword based hybrid framework. A hybrid framework implemented with functional and keyword driven components. A hybrid framework is a collection of features from the other framework types. Hybrid framework is the most commonly used framework in test automation projects. There are many different ways to create a Hybrid Framework. Main Components of Hybrid Framework: 1. Driver Script: These are the actual UFT test scripts. For each scenario that you would automate, you would need to create a separate UFT test script. 2. Function Libraries: This hybrid automation framework will use function libraries. The function library will store all the generic functions (application independent functions) such as click on a link, to enter value in a text field etc. Also the function library will contain application specific functions such as login, logout etc. 3. Data Sheets: Excel sheets will be used extensively by the hybrid framework that we would create. Excel sheets will be primarily used to store the following information - a. Test Cases: List of all the test scripts will be maintained in excel sheet. This will be used for batch execution. b. Test Data: All the test data would come from excel sheets. No test data will be hard-coded anywhere in the test scripts. c. Test Results: Excel sheets will be used to provide a summarized result of batch execution. 4. Object Repositories: All the object definitions will be stored in the object repository. Folder Structure: The folder structure that would be used for hybrid framework is given below. 1. Parent Folder: This is the parent folder. All the framework code, data sheet and other resources will be stored inside this folder. 2. DataSheet Folder: All your excel data sheets will be stored in this folder. By: Noor Hossin Web: [email protected] Page: 83

84 3. FunctionLibrary Folder: This folder's will be used to store all the function libraries. 4. ObjectRepository Folder: This folder's will be used to store object repositories. 5. Resources Folder: This is just a top-level folder that has many sub-folders inside it. For example, if your test cases upload or download some files to/from the application, then those files will be stored in this folder. 6. Results Folder: Results folder contains many sub-folders that will be used to store the test results and the error screenshots. 7. Batch Folder: This is the folder that takes care of the batch execution. The batch excel sheet (which will have the list of all the test cases) and the excel macro will be stored in this folder. DataSheet Design: Test Cases: Test Data: Test Result: Features of the Hybrid Framework: Following are some of the important features that you will see in this hybrid framework. Batch Execution: This framework will be optimized for batch execution. This is what most good frameworks are all about. With this framework, you will be able to easily select the test cases that you want to execute in batch run. Automate Scripts: To execute your test scripts, you would not be required to open UFT. This would be taken care of entirely by the driver script (excel macro) or Automation Object Model (AOM). By: Noor Hossin Web: [email protected] Page: 84

85 Test Execution Results: This framework will provide the test execution results at two different levels summarized results and detailed results. Date-Time Stamp: The test execution results from multiple runs would not be overwritten. Each test execution result will be appended by date-time stamp so that it can be referenced whenever required. Automatically Send s: The hybrid framework will have the provision to automatically send s (with the test results) after completion of a batch run. External Configuration: The framework will contain an external configuration sheet which will help you to configure many of the features of the framework without having to touch any of the code. Advantages of Hybrid Framework: The main advantage of this approach is that you can use the best features from all the types of frameworks to create your own. Disadvantages of Hybrid Framework: The framework is highly complex and needs very good programming expertise and experience to build a Hybrid Framework from scratch Implementation of Each Framework on Real Applications (1) Modular Framework A. Consider the following 2 test cases: I. Register New User at Elance.com. II. Sign In Elance.com with Valid Credential. Folder Structure: Driver Script Repositories Libraries (Function Library) Driver Script: 'Modular Framework Driver Script RepositoriesCollection.Add "E:\UFT\MyScript\Repositories\ElanceRepository.tsr" ExecuteFile "E:\UFT\MyScript\Libraries\ModularElanceLibrary.qfl" LaunchApplication "IE"," LandingPage Registration "[email protected]","uft","lab","uftlab","almuft12","other","facebook" SignIn "uftlab","almuft12" Wait 3 SignOut Function Library: 'Modular Framework Function Library Function LaunchApplication(BrowserName,AppUrl) Select Case BrowserName Case "IE" SystemUtil.CloseProcessByName "iexplore.exe" SystemUtil.Run "iexplore.exe",appurl Case "Chrome" SystemUtil.CloseProcessByName "chrome.exe" By: Noor Hossin Web: [email protected] Page: 85

86 SystemUtil.Run "chrome.exe",appurl Case "Firefox" SystemUtil.CloseProcessByName "firefox.exe" SystemUtil.Run "firefox.exe",appurl End Select End Function Function LandingPage Browser("Hire freelancers and find").page("hire freelancers and find").link("join").click Browser("Hire freelancers and find").page("elance: Signup Select").WebElement("I want to WorkFind clients,").click Browser("Hire freelancers and find").page("elance: Signup Select").WebElement("Continue»").Click End Function Function Registration( ,fname,lname,uname,pass,country,hearus) Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit(" Address").Set Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("firstName").Set fname Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("lastName").Set lname Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("username").Set uname Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("password1").Set pass Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("password2").Set pass Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebList("country").Select country Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebCheckBox("showInitialOnly").Click Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebList("source").Select hearus Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebCheckBox("tos").Click Wait 2 Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebElement("Register").Click End Function Function SignIn(username,password) Browser("Hire freelancers and find").page("hire freelancers and find_2").link("sign In").Click Browser("Hire freelancers and find").page("elance: Please Sign In").WebEdit("lnm").Set username Browser("Hire freelancers and find").page("elance: Please Sign In").WebEdit("pwd").Set password Browser("Hire freelancers and find").page("elance: Please Sign In").WebElement("Sign In").Click End Function Function SignOut Browser("Opportunities").Page("Opportunities").Link("uftlab").Click Browser("Hire freelancers and find").page("opportunities").link("sign Out").Click End Function B. Consider the following Test Case: I. Modular Framework using Descriptive Program to Fill the Contact form at peoplentech.com and submit the form. Driver Script: 'Modular Framework using Descriptive Program SystemUtil.CloseProcessByName "iexplore.exe" Set pnt=browser("title:=.*").page("title:=.*") By: Noor Hossin Web: [email protected] Page: 86

87 Function LaunchApplication(BrowserName,AppURL) Select Case BrowserName Case "IE" SystemUtil.Run "iexplore.exe",appurl Case "Firefox" SystemUtil.Run "firefox.exe",appurl Case "Chrome" SystemUtil.Run "chrome.exe",appurl End Select End Function Function LinkClick(name) Set ObjClick=Description.Create ObjClick("html tag").value="a" ObjClick("name").Value=name pnt.link(objclick).click End Function Function WebEditSet(name,value) Set ObjWebEdit=Description.Create ObjWebEdit("html tag").value="input" ObjWebEdit("name").Value=name pnt.webedit(objwebedit).set value End Function Function WebEditTextAreaSet(name,value) Set ObjTextArea=Description.Create ObjTextArea("html tag").value="textarea" ObjTextArea("name").Value=name pnt.webedit(objtextarea).set value End Function Function WebButtonSet(name) Set ObjWebButton=Description.Create ObjWebButton("html tag").value="input" ObjWebButton("name").Value=name pnt.webbutton(objwebbutton).click End Function LaunchApplication "IE", " Wait 3 LinkClick "Contact" Wait 3 WebEditSet "firstname","noor" Wait 3 WebEditSet "lastname","hossin" Wait 3 WebEditSet "company","pnt" Wait 3 WebEditSet " ","[email protected]" Wait 3 WebEditSet "phone"," " Wait 3 WebEditTextAreaSet "message","hybrid Framework Assignment" Wait 3 WebButtonSet "Submit" (2) Data Driven Framework Script: Consider the following 2 Test Cases: A. Login to peoplentech.com using valid credential. B. Login to peoplentech.com using Invalid credential. (Negative Test Case) By: Noor Hossin Web: [email protected] Page: 87

88 Folder Structure: Driver Script Repositories (Used Local Object Repo) Libraries (Didn t Use Function Library) Test Data Driver Script: 'Data Driven Framework SystemUtil.Run "iexplore.exe"," SystemUtil.CloseProcessByName "EXCEL.EXE" 'Kill a process Set excel=createobject("excel.application") excel.visible=true Set wb=excel.workbooks.open("testdata\testdata.xlsx") Set ws=wb.worksheets("testcases") 'When test case is Pass username=ws.cells(2,"c") password=ws.cells(2,"d") Browser(":: PeopleNTech, LLC. ::").Page(":: PeopleNTech, LLC. ::").WebEdit("user").Set username Browser(":: PeopleNTech, LLC. ::").Page(":: PeopleNTech, LLC. ::").WebEdit("passwrd").Set password Browser(":: PeopleNTech, LLC. ::").Page(":: PeopleNTech, LLC. ::").WebButton("Login").Click 'Verify login is success or fail If Browser(":: PeopleNTech, LLC. ::").Page("- Index").Link("Logout").Exist Then ws.cells(2,"e")="passed" Else ws.cells(2,"e")="failed" End If 'When Negative test case: 'username=ws.cells(3,"c") 'password=ws.cells(3,"d") ''Browser(":: PeopleNTech, LLC. ::_2").Page(":: PeopleNTech, LLC. ::").WebEdit("user").Set username 'Browser(":: PeopleNTech, LLC. ::_2").Page(":: PeopleNTech, LLC. ::").WebEdit("passwrd").Set password 'Browser(":: PeopleNTech, LLC. ::_2").Page(":: PeopleNTech, LLC. ::").WebButton("Login").Click ''If Browser(":: PeopleNTech, LLC. ::_2").Page("Login").WebElement("Password incorrect").exist Then ' ws.cells(3,"e")="passed" 'Else ' ws.cells(3,"e")="failed" 'End If wb.save wb.close excel.quit Set ws=nothing Set wb=nothing Set excel=nothing 'SystemUtil.CloseProcessByName "iexplore.exe" Browser(":: PeopleNTech, LLC. ::").Close Create a Data Driven Framework using Shared Object Repository and Data Table for myspace.com integrated with QC/ALM. Automate the 2 test cases - A. Sign Up New User B. Sign In and Post Update Function Library: Function LaunchApp(BrowserName) Select Case BrowserName Case "IE" By: Noor Hossin Web: [email protected] Page: 88

89 SystemUtil.CloseProcessByName "iexplore.exe" AppUrl=Environment.Value("appurl") SystemUtil.Run "iexplore.exe",appurl Case "Chrome" SystemUtil.CloseProcessByName "chrome.exe" SystemUtil.Run "chrome.exe",appurl Case "Firefox" SystemUtil.CloseProcessByName "firefox.exe" SystemUtil.Run "firefox.exe",appurl End Select End Function Function LandingPage Browser("Featured Content on Myspace").Page("Featured Content on Myspace").WebButton("Sign up").click Browser("Featured Content on Myspace").Page("Featured Content on Myspace_2").WebButton(" ").Click End Function Function SignUp Browser("Featured Content on Myspace").Page("Featured Content on Myspace_3").WebEdit("fullName").Set DataTable("TestData1", dtlocalsheet) Browser("Featured Content on Myspace").Page("Featured Content on Myspace_3").WebEdit("username").Set DataTable("TestData2", dtlocalsheet) Browser("Featured Content on Myspace").Page("Featured Content on Myspace_3").WebEdit(" ").Set DataTable("TestData3", dtlocalsheet) Browser("Featured Content on Myspace").Page("Featured Content on Myspace_3").WebEdit("zipcode").Set DataTable("TestData4", dtlocalsheet) Browser("Featured Content on Myspace").Page("Featured Content on Myspace_3").WebList("gender").Select DataTable("TestData5", dtlocalsheet) Browser("Featured Content on Myspace").Page("Featured Content on Myspace_3").WebEdit("password").Set DataTable("TestData6", dtlocalsheet) Browser("Featured Content on Myspace").Page("Featured Content on Myspace_3").WebEdit("birthMonth").Set DataTable("TestData7", dtlocalsheet) Browser("Featured Content on Myspace").Page("Featured Content on Myspace_3").WebEdit("birthDay").Set DataTable("TestData8", dtlocalsheet) Browser("Featured Content on Myspace").Page("Featured Content on Myspace_3").WebEdit("birthYear").Set DataTable("TestData9", dtlocalsheet) Wait 2 Browser("Featured Content on Myspace").Page("Featured Content on Myspace_3").WebCheckBox("agreeTOS").Click Browser("Featured Content on Myspace").Page("Featured Content on Myspace_3").WebButton("Create Account").Click Browser("Featured Content on Myspace").Page("Myspace").WebButton("Take me to my Profile").Click 'verify Browser("Noor Hossin (uftlab) on").page("noor Hossin (uftlab) on").webelement("webelement").check CheckPoint("WebElement") End Function Function LogOut Wait 3 Browser("Featured Content on Myspace").Page("Noor Hossin (uftlab) on").webelement("webelement").click Browser("Featured Content on Myspace").Page("Noor Hossin (uftlab) on").link("sign Out").Click End Function Function SignIn DataTable.SetCurrentRow(2) Browser("Featured Content on Myspace").Page("Featured Content on Myspace").WebButton("Sign in").click Browser("Featured Content on Myspace").Page("Featured Content on Myspace_4").WebEdit(" ").Set DataTable("TestData1", dtlocalsheet) By: Noor Hossin Web: [email protected] Page: 89

90 Browser("Featured Content on Myspace").Page("Featured Content on Myspace_4").WebEdit("password").Set DataTable("TestData2", dtlocalsheet) Browser("Featured Content on Myspace").Page("Featured Content on Myspace_4").WebButton("Sign In").Click Wait 3 End Function Function PostUpdate Browser("Featured Content on Myspace").Page("Noor Hossin (uftlab) on").link("stream").click Browser("Featured Content on Myspace").Page("Myspace_2").WebEdit("WebEdit").Set DataTable("TestData3", dtlocalsheet) Browser("Featured Content on Myspace").Page("Myspace_2").WebButton("Post").Click Wait 2 If Browser("Featured Content on Myspace").Page("Myspace_2").WebElement("Bootcamp Lab").Exist Then DataTable("Result", dtlocalsheet)="passed" Else DataTable("Result", dtlocalsheet)="failed" End If End Function Function CloseBrowser While Browser("CreationTime:=0").Exist Browser("CreationTime:=0").Close Wend End Function Driver Script: RepositoriesCollection.Add "E:\UFT\MyScript\PeopleNTechBootcamp\MySpace\Repositories\myspace-sor.tsr" LoadFunctionLibrary "E:\UFT\MyScript\PeopleNTechBootcamp\MySpace\FunctionLibrary\myspace-fl.qfl" LaunchApp "IE" LandingPage SignUp LogOut SignIn PostUpdate LogOut CloseBrowser (3) Keyword Driven Framework: Consider the following 2 Test Cases: A. Register New User at Elance.com using Keyword Driven Framework. B. Sign In Elance.com using Keyword Driven Framework. Folder Structure: Driver Script Repositories Libraries (Function Library) TestData Test Script: 'Keyword Driven Framework Driver Script RepositoriesCollection.Add "Repositories\ElanceRepository.tsr" ExecuteFile "Libraries\KeywordElanceLibrary.qfl" Set excel=createobject("excel.application") Set wb=excel.workbooks.open("e:\uft\myscript\gdkeyword\testdata\kewordelancedata.xlsx") excel.visible=true By: Noor Hossin Web: [email protected] Page: 90

91 Set wstc=wb.worksheets("testcase") Set wstd=wb.worksheets("testdata") Dim rc_wstc,rc_wstd rc_wstc=wstc.usedrange.rows.count rc_wstd=wstd.usedrange.rows.count For i = 2 To rc_wstc Step 1 If wstc.cells(i,"d")="y" Then For j = 2 To rc_wstd Step 1 If wstc.cells(i,"b")= wstd.cells(j,"b") Then If KeywordMapper(wstd.Cells(j,"E"),wstd.Cells(j,"F"),wstd.Cells(j,"G"),wstd.Cells(j,"H"),wstd.Cells(j,"I" ),wstd.cells(j,"j"),wstc.cells(i,"e")) Then wstc.cells(i,"f")="passed" Else wstc.cells(i,"f")="failed" End If End If Next End If Next wb.save wb.close excel.quit Set wstd=nothing Set wstc=nothing Set wb=nothing Set excel=nothing Function KeywordMapper(keywords,testdata1,testdata2,testdata3,testdata4,testdata5,browsername) Select Case keywords Case "LaunchApplication" KeywordMapper=LaunchApplication(browsername,testdata1) Case "LandingPage" KeywordMapper=LandingPage() Case "WebEditSet" KeywordMapper=WebEditSet(testdata1,testdata2,testdata3,testdata4,testdata5) 'Case "SetWebLists" 'KeywordMapper=SetWebLists(testdata1) Case "WebCheckClick" KeywordMapper=WebCheckClick() Case "WebButtonClick" KeywordMapper=WebButtonClick() Case "SignIn" KeywordMapper=SignIn(testdata1,testdata2) Case "SignOut" KeywordMapper=SignOut() End Select End Function 'Keyword Framework Function Library Function LaunchApplication(BrowserName,AppUrl) Select Case BrowserName Case "IE" SystemUtil.CloseProcessByName "iexplore.exe" SystemUtil.Run "iexplore.exe",appurl Case "Chrome" SystemUtil.CloseProcessByName "chrome.exe" SystemUtil.Run "chrome.exe",appurl Case "Firefox" SystemUtil.CloseProcessByName "firefox.exe" SystemUtil.Run "firefox.exe",appurl By: Noor Hossin Web: [email protected] Page: 91

92 End Select End Function Function LandingPage Browser("Hire freelancers and find").page("hire freelancers and find").link("join").click Browser("Hire freelancers and find").page("elance: Signup Select").WebElement("I want to WorkFind clients,").click Browser("Hire freelancers and find").page("elance: Signup Select").WebElement("Continue»").Click End Function Function WebEditSet( ,fname,lname,uname,pass) Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit(" Address").Set Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("firstName").Set fname Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("lastName").Set lname Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("username").Set uname Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("password1").Set pass Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebEdit("password2").Set pass 'Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebList("country").Select "Other" 'Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebList("source").Select "Blog" End Function Function WebCheckClick Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebCheckBox("showInitialOnly").Click Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebCheckBox("tos").Click End Function Function WebButtonClick Wait 2 Browser("Hire freelancers and find").page("elance: Freelancer Registratio").WebElement("Register").Click End Function Function SignIn(username,password) Browser("Hire freelancers and find").page("hire freelancers and find_2").link("sign In").Click Browser("Hire freelancers and find").page("elance: Please Sign In").WebEdit("lnm").Set username Browser("Hire freelancers and find").page("elance: Please Sign In").WebEdit("pwd").Set password Browser("Hire freelancers and find").page("elance: Please Sign In").WebElement("Sign In").Click Wait 3 End Function Function SignOut Browser("Opportunities").Page("Opportunities").Link("uftlab").Click Browser("Hire freelancers and find").page("opportunities").link("sign Out").Click End Function (4) Hybrid Framework (i) Consider the following 2 Test Cases: A. Login to PeopleNTech. B. Search on Forum for given keyword. By: Noor Hossin Web: [email protected] Page: 92

93 Folder Structure: DriverScript Repositories Libraries (Function Library) TestData Steps: A. Design Excel WorkBook B. Create Function Library C. Modifications DriverScript Solution: 'Function Library for PeopleNTech Hybrid Framework RepositoriesCollection.Add "E:\SQA\Docs\Unified Functional Testing\Repository\pnthfrepo.tsr" Function LaunchApplication(BrowserType,AppURL) Select Case BrowserType Case "IE" SystemUtil.Run "iexplore.exe",appurl Case "Chrome" SystemUtil.Run "chrome.exe",appurl Case "Firefox" SystemUtil.Run "firefox.exe",appurl End Select If Browser("title:=.*").Exist(5) Then LaunchApplication=True Else LaunchApplication=False End If End Function Function UserLogin(username,password) Wait 3 Browser(":: PeopleNTech, LLC. ::").Page(":: PeopleNTech, LLC. ::").WebEdit("user").Click Browser(":: PeopleNTech, LLC. ::").Page(":: PeopleNTech, LLC. ::").WebEdit("user").Set username Browser(":: PeopleNTech, LLC. ::").Page(":: PeopleNTech, LLC. ::").WebEdit("passwrd").Set password Browser(":: PeopleNTech, LLC. ::").Page(":: PeopleNTech, LLC. ::").WebButton("Login").Click UserLogin=True End Function Function SearchForum(keyword) Browser(":: PeopleNTech, LLC. ::").Page("- Index").WebElement("Search").Click Browser(":: PeopleNTech, LLC. ::").Page("- Index").WebEdit("search").Set keyword Browser(":: PeopleNTech, LLC. ::").Page("- Index").WebButton("Search").Click If (Browser(":: PeopleNTech, LLC. ::").Page("- Index").WebElement("Search Results").Exist) Then 'Browser(":: PeopleNTech, LLC. ::").Page("- Index").WebElement("Search results for: qtp").getroproperty("innertext")="search Results for: ""&keyword") Then SearchForum=True Else SearchForum=False End If End Function Function CloseApplication Browser("title:=.*").CloseAllTabs If Browser("title:=.*").Exist(5) Then CloseApplication=False Else CloseApplication=True End If End Function By: Noor Hossin Web: [email protected] Page: 93

94 Driver Script: 'Driver Script for PeopleNTech Hybrid Framework LoadFunctionLibrary "E:\QA Engineering\Docs\Unified Functional Testing\Function Library\pnthybrid.qfl" Set excel= CreateObject("Excel.Application") Set WB=excel.Workbooks.Open("E:\QA Engineering\Docs\PNTHFTestData.xlsx") Set WS_TC=WB.Worksheets("TestCases") Set WS_TD=WB.Worksheets("TestData") rcnt_tc=ws_tc.usedrange.rows.count rcnt_td=ws_td.usedrange.rows.count Dim result result=true For i = 2 To rcnt_tc Step 1 If WS_TC.Cells(i,"E")="Y" Then 'Execute Value for my Test Case, Start StartTime = Timer For j = 2 To rcnt_td Step 1 'Test Data Rows If WS_TC.Cells(i,"C")=WS_TD.Cells(j,"B") Then If KeywordMapper(WS_TD.Cells(j,"E"),WS_TD.Cells(j,"F"),WS_TD.Cells(j,"G"),WS_TC.Cells(i,"B")) Then WS_TD.Cells(j,"H")="Passed" Else WS_TD.Cells(j,"H")="Failed" 'Browser("title:=.*").CaptureBitmap "E:\SQA\Docs\"&WS_TC.Cells(i,"C")&"_"&"StepNo_"&WS_TD.Cells(j,"C")&".png" result=false End If End If Next 'Test Case Result If result Then WS_TC.Cells(i,"F")="Passed" Else WS_TC.Cells(i,"F")="Failed" End If 'Test Case End EndTime=Timer Duration=EndTime-StartTime WS_TC.Cells(i,"G")=Int(Duration) WS_TC.Cells(i,"H")=Now End If Next WB.Save WB.Close excel.quit Set WS_TD=Nothing Set WS_TC=Nothing Set WB=Nothing Set excel=nothing Function KeywordMapper(keywordname,testdata1,testdata2,browsertype) Select Case keywordname Case "LaunchApplication" KeywordMapper=LaunchApplication(browsertype,testdata1) Case "UserLogin" KeywordMapper=UserLogin(testdata1,testdata2) Case "CloseApplication" Wait 3 KeywordMapper=CloseApplication() Case "SearchForum" KeywordMapper=SearchForum(testdata1) End Select By: Noor Hossin Web: [email protected] Page: 94

95 End Function (ii) Create Two Test Cases for Kroger Using Hybrid Framework A. Change the Store to Nearest Store at Kroger.com B. Search for a Keyword Test Script: 'Functions Library for Kroger RepositoriesCollection.Add "E:\QA Engineering\Docs\Unified Functional Testing\krogerhf.tsr" Function LaunchApplication(BrowserType,AppURL) Select Case BrowserType Case "IE" SystemUtil.Run "iexplore.exe",appurl Case "Chrome" SystemUtil.Run "chrome.exe",appurl Case "Firefox" SystemUtil.Run "firefox.exe",appurl End Select If Browser("title:=.*").Exist(5) Then LaunchApplication=True Else LaunchApplication=False End If End Function Function ChangeToNearestStore(ZipCode) Browser("Kroger").Page("LandingPage").WebElement("Change Store").Click Browser("Kroger").Page("LandingPage").WebEdit("store").Click Browser("Kroger").Page("LandingPage").WebEdit("store").Set ZipCode Browser("Kroger").Page("LandingPage").WebButton("Search").Click Browser("Kroger").Page("LandingPage").WebButton("Make Preferred Store").Click ChangeToNearestStore=True End Function Function CloseApplication Browser("title:=.*").CloseAllTabs If Browser("title:=.*").Exist(5) Then CloseApplication=False Else CloseApplication=True End If End Function Function SearchForKeyword(keyword) Browser("Kroger").Page("LandingPage").WebEdit("query").Click Browser("Kroger").Page("LandingPage").WebEdit("query").Set keyword Browser("Kroger").Page("LandingPage").WebButton("Search_2").Click wait 5 'Print Browser("Kroger").Page("SearchResultsPage").WebElement("Search Results for 'flowers'").getroproperty("outertext") 'Print "Search Results for """&keyword&"""" If (Browser("Kroger").Page("SearchResultsPage").WebElement("Search Results for 'flowers'").getroproperty("outertext")="search Results for """&keyword&"") Then SearchForKeyword=True Else SearchForKeyword=False End If End Function Driver Script: 'Associate the FL with our DriverScript By: Noor Hossin Web: [email protected] Page: 95

96 LoadFunctionLibrary "E:\QA Engineering\Docs\Unified Functional Testing\KrogerHFFunctions.qfl" Set excel=createobject("excel.application") excel.visible=true Set WB=excel.Workbooks.Open("E:\QA Engineering\Docs\KrogerHFTestData.xlsx") Set WS_TC=WB.Worksheets("TestCases") Set WS_TD=WB.Worksheets("TestData") rcnt_tc=ws_tc.usedrange.rows.count rcnt_td=ws_td.usedrange.rows.count Dim result result=true For i = 2 To rcnt_tc Step 1 'Test Cases Rows If WS_TC.Cells(i,"E")="Y" Then 'Execute Value for my Test Case, Start StartTime = Timer For j = 2 To rcnt_td Step 1 'Test Data Rows If WS_TC.Cells(i,"C")=WS_TD.Cells(j,"B") Then If KeywordMapper(WS_TD.Cells(j,"E"),WS_TD.Cells(j,"F"),WS_TD.Cells(j,"G"),WS_TC.Cells(i,"B")) Then WS_TD.Cells(j,"H")="Passed" Else WS_TD.Cells(j,"H")="Failed" Browser("title:=.*").CaptureBitmap "E:\QA Engineering\Docs\"&WS_TC.Cells(i,"C")&"_"&"StepNo_"&WS_TD.Cells(j,"C")&".png" result=false End If End If Next 'Test Case Result If result Then WS_TC.Cells(i,"F")="Passed" Else WS_TC.Cells(i,"F")="Failed" End If 'Test Case End EndTime=Timer Duration=EndTime-StartTime WS_TC.Cells(i,"G")=Int(Duration) WS_TC.Cells(i,"H")=Now End If Next WB.Save WB.Close excel.quit Set WS_TD=Nothing Set WS_TC=Nothing Set WB=Nothing Set excel=nothing Function KeywordMapper(keywordname,testdata1,testdata2,browsertype) Select Case keywordname Case "LaunchApplication" KeywordMapper=LaunchApplication(browsertype,testdata1) Case "ChangeToNearestStore" KeywordMapper=ChangeToNearestStore(testdata1) Case "CloseApplication" KeywordMapper=CloseApplication Case "SearchForKeyword" KeywordMapper=SearchForKeyword(testdata1) End Select End Function Batch Runner By: Noor Hossin Web: [email protected] Page: 96

97 Test Batch Runner enables you to run tests in a collective, successive test run. Tests are run individually but sequentially in a single session. You can use Test Batch Runner only on tests stored on the file system. You cannot use Test Batch Runner for tests stored in ALM. Using Test Batch Runner, you create a list of tests and save the list as a batch.mtb file, so that you can run the same batch of tests again at another time. Test batches can also be added to another test batch by adding an.mtb test batch file to a new test batch. When Test Batch Runner opens, it checks to make sure that all tests within a test batch exist. If you do not want to run the test batch through the Test Batch Runner interface, you can run the Test Batch Runner from the Windows Command Line. You provide the location of a.mtb file, a test folder, or a directory of tests as a command argument and Test Batch Runner runs the test batch and displays the run results. How to Create and Run a Test Batch This task explains how to create and run a test batch using Test Batch Runner. 1. Test Batch Runner Select Start > All Programs > HP Software > HP Unified Functional Testing > Tools > Test Batch Runner. This opens a separate window for the Test Batch Runner program. You do not need to have UFT open to use Test Batch Runner. 2. Access the Test Batch File To create a new test batch file, select File > New or click the New batch file button. To open an existing batch file, select File > Open or click the Open batch file button. In the Open dialog box, navigate to the folder in which the batch file is found and click Open. The tests from the opened batch file are added to the Test Batch Runner main window. 3. Add Batches or Tests To add a test batch file (.mtb), select File > Add or click the Add button. Navigate to the folder in which the batch file is saved. To add individual tests, select Tests > Add or click the Add button. In the Browse for Folder dialog box, select the folder in which your tests are located. All the tests from the selected folder are added to the Tests pane in the main Test Batch Runner window. 4. Select the Tests to be Part of the Test Batch Run Select the checkboxes for the tests that you want to include in the test batch run. 5. Save the Test Batch Select File > Save or click the Save button in the toolbar to save the test batch with the included test. Give your batch file a meaningful name and assign it to a place in your directory. 6. Run the Test Batch Click the Run button to run the test batch. The Output pane provides run log details of the batch run while the batch is running. 7. View the Test Batch Run Results By: Noor Hossin Web: [email protected] Page: 97

98 In the Tests pane, click the results link for a specific test in the Run Results column. This opens the results for that test in the Run Results Viewer. For details on the Run Results Viewer, click F1 within the viewer window. Test Batch Runner Using AOM Concept Automation Object Model or AOM concept is used for Test Batch Runner. In AOM create a list of tests and save the list as a batch is stored in.vbs files and execution is done by just double click on VBS file. Automatically QTP invokes and does whatever insists in the Script. So that you can run the same batch of tests again at another time. Suppose we have two test scripts. Following is the AOM script to run this script as a batch runner. AOM Script for Batch Runner: Dim TestOpen Dim TestResult Set App = CreateObject("QuickTest.Application") If App.launched <> True then App.Launch End If App.Visible = True 'Set QuickTest run options App.Options.Run.ImageCaptureForTestResults = "OnError" App.Options.Run.RunMode = "Fast" App.Options.Run.ViewResults = False '***************Open & Run the First Test******************* App.Open "E:\UFT\MyScript\htmldom", True Set TestOpen = App.Test TestOpen.Settings.Run.OnError = "NextStep" 'Next step when error occurs Set TestResult = CreateObject("QuickTest.RunResultsOptions") 'Create the Run Results Options object TestResult.ResultsLocation = "E:\UFT\MyScript\PeopleNTechBootcamp\MySpace\" 'Results location TestOpen.Run TestResult 'Run the test MsgBox TestOpen.LastRunResults.Status 'Check the results of the test run TestOpen.Close App.quit '***************Open & Run the Second Test******************* App.Open "E:\UFT\MyScript\childobject", True Set TestOpen = App.Test TestOpen.Settings.Run.OnError = "NextStep" 'Next step when error occurs Set TestResult = CreateObject("QuickTest.RunResultsOptions") 'Create the Run Results Options object TestResult.ResultsLocation = "E:\UFT\MyScript\PeopleNTechBootcamp\MySpace\" 'Results location TestOpen.Run TestResult 'Run the test MsgBox TestOpen.LastRunResults.Status 'Check the results of the test run TestOpen.Close App.quit Set TestResult = nothing Set TestOpen = Nothing Set App = Nothing By: Noor Hossin Web: [email protected] Page: 98

99 Task Scheduler Use the Windows Task Scheduler in order to run UFT scripts at a scheduled time. By this method you can schedule individual script or multiple scripts. Scripts will run automatically. Steps to Create Task Scheduler: 1. Create a.vbs file to launch UFT by Test Batch Runner Using AOM Concept. 2. Open the Task Scheduler from Control Panel\All Control Panel Items\Administrative Tools 3. On the Task Scheduler screen, click "Create Task... from the right section of the screen. 4. After defining the name of the task in the General Tab, you need to define the Trigger, Actions, Conditions, and specify any additional Settings. I'll be creating a Task that executes at 8:00 AM everyday. ************************************************************ CH-12: Additional Topics Additional Topics includes Automation Object Model, Page Object Model, Integration of QTP with ALM/QC, Create Scripts to Extract Data from the Database Using ODBC and miscellaneous topics Automation Object Model The UFT automation object model provides objects, methods, and properties that enable you to control UFT from another application. Using the objects, methods, and properties exposed by the UFT automation object model, you can write scripts that configure UFT options and run tests or components instead of performing these operations manually using the UFT interface. By: Noor Hossin Web: [email protected] Page: 99

100 The AOM enables you to automate test management. Automation scripts are especially useful for performing the same tasks multiple times or on multiple tests or components, or for quickly configuring UFT according to your needs for a particular environment or application. The Key Configurations/actions that can be controlled by AOM are listed below: Loads all the required add-ins for a test. Makes QTP visible while execution. Opens the Test using the specified location. Associated Function Libraries. Specifies the Common Object Sync Time out. Start and End Iteration. Enable/Disable Smart Identification. On Error Settings. Data Table Path. Recovery Scenario Settings. Log Tracking Settings. Use of AOM: When a large no of scripts to be uploaded to QC/ALM. A simple script can save hours of manual work. To initialize UFT options and settings like add-ins etc. To call UFT from other application: For example, write a macro for calling UFT from excel. Note: AOM should be use outside of UFT and not within the script. Though there is no harm using it inside but some of the AOM statements might fail. How to Generate AOM Scripts? Every automation script begins with the creation of the QuickTest "Application" object. It simply provides an object from which you can access all other objects, methods and properties of the QuickTest automation object model. You can create only one instance of the Application object. AOM Script can generate from UFT itself using "Generate Script" Option. Navigate to File > Settings... > Properties > Generate Script AOM Scripts: Start UFT, Open an Existing Test and Run the Test. Store Run Results in Specified Folder. Dim TestOpen Dim TestResult Set App = CreateObject("QuickTest.Application") If App.launched <> True then App.Launch End If App.Visible = True 'Set QuickTest run options App.Options.Run.ImageCaptureForTestResults = "OnError" App.Options.Run.RunMode = "Fast" App.Options.Run.ViewResults = False 'Open the test App.Open "E:\UFT\MyScript\PeopleNTechBootcamp\MySpace\myspace", True By: Noor Hossin Web: [email protected] Page: 100

101 Set TestOpen = App.Test TestOpen.Settings.Run.OnError = "NextStep" 'Next step when error occurs Set TestResult = CreateObject("QuickTest.RunResultsOptions") 'Create the Run Results Options object TestResult.ResultsLocation = "E:\UFT\MyScript\PeopleNTechBootcamp\MySpace\" 'Results location TestOpen.Run TestResult 'Run the test MsgBox TestOpen.LastRunResults.Status 'Check the results of the test run TestOpen.Close App.quit Set TestResult = nothing Set TestOpen = Nothing Set App = Nothing Page Object Model Page Object Model is one of the most widely used design patterns by the Selenium WebDriver community across the world. In the initial days of functional automation, tools like Winrunner and UFT were the leading tools. These tools were more based on the procedural programming approach, as the languages they support like TSL and VB Scripting were not based on Object Oriented Programming (OOP). Page Object Model or POM is a concept to create pages as objects and write tests on top of those. This is as simple as this. It tremendously reduces the code duplication and allows us to take the advantage of OOP for our testing. It makes automation easily readable, reusable, and maintainable. To design a Page Object, first we need to understand that a page can typically be divided in functional or in structural manner. Each page of your AUT (Application Under Test) is mapped to a class file in your code and each method within the class file can be treated as a service offered by the Page Object. As an example, think of Amazon.com's homepage and this page offers the services like ability to search for a product, to navigate to a specific product category, etc. Test Script: 'Create Page Object Model Framework SystemUtil.CloseProcessByName "iexplore.exe" RepositoriesCollection.Add "E:\QA Engineering\Docs\Unified Functional Testing\Repository\pom.tsr" SystemUtil.Run "iexplore.exe"," Class LandingPage Function SignIn Browser("Amazon.com: Online Shopping").Page("Amazon.com: Online Shopping").WebElement("Sign in").click Set SignIn=New SignInPage End Function Function Register Browser("Amazon.com: Online Shopping").Page("Amazon.com: Online Shopping").Link("Start here.").click Set Register=New RegisterPage End Function Function Search Browser("Amazon.com: Online Shopping").Page("Amazon.com: Online Shopping").WebEdit("field-keywords").Click Set Search=New SearchResultsPage By: Noor Hossin Web: [email protected] Page: 101

102 End Function End Class Class RegisterPage Function UserRagistrationPage(name, ,phone,pass) Browser("Amazon.com: Online Shopping").Page("Amazon.com Registration").WebEdit("customerName").Set name Browser("Amazon.com: Online Shopping").Page("Amazon.com Registration").WebEdit(" ").Set Browser("Amazon.com: Online Shopping").Page("Amazon.com Registration").WebEdit(" Check").Set Browser("Amazon.com: Online Shopping").Page("Amazon.com Registration").WebEdit("mobilePhoneNumber").Set phone Browser("Amazon.com: Online Shopping").Page("Amazon.com Registration").WebEdit("password").Set pass Browser("Amazon.com: Online Shopping").Page("Amazon.com Registration").WebEdit("passwordCheck").Set pass Browser("Amazon.com: Online Shopping").Page("Amazon.com Registration").WebButton("Create account").click End Function End Class Class SignInPage Function UserSignIn( ,pass) Browser("Amazon.com: Online Shopping").Page("Amazon.com Sign In").WebEdit(" ").Set Browser("Amazon.com: Online Shopping").Page("Amazon.com Sign In").WebEdit("password").Set pass Browser("Amazon.com: Online Shopping").Page("Amazon.com Sign In").WebButton("Sign in using our secure").click End Function End Class Class SearchResultsPage Function KeywordSearch(keyword) Browser("Amazon.com: Online Shopping").Page("Amazon.com: Online Shopping").WebEdit("field-keywords").Set keyword Browser("Amazon.com: Online Shopping").Page("Amazon.com: Recommended").WebButton("Go").Click End Function End Class Set lp=new LandingPage 'Set rp=lp.register 'rp.userragistrationpage "Noor", " ", "abcd1234" Set si=lp.signin si.usersignin "abcd1234" Set sr=lp.search sr.keywordsearch "laptop" Integration of QTP with ALM/QC Application Lifecycle Management/Quality Center (ALM/QC) is a comprehensive test management tool which is a web-based repository for all testing assets. HP QC can help you organize and control the testing process. QC supports high level communication and association among various stakeholders like Business Analyst, Developers, and Testers etc. It help in driving a more effective and efficient global application-testing process. Automation Tools like UFT, WinRunner and LoadRunner can be integrated with ALM/QC. You can also create reports and graphs for Analysis and Tracking for Test processes. By: Noor Hossin Web: [email protected] Page: 102

103 Advantages of Integrating UFT with ALM: Mapping manual test cases to automation. Version tracking of automation suite. Scheduling of test suite from ALM. UFT resource storage. One repository of the entire automation reusable framework. Required Add-ins: 1. If you are running the tests on the same computer where you have ALM client installed, then you will need: UFT Connectivity Add-In. UFT Add-in. 2. If you are running the tests on the different computer than where you have ALM client installed, then you will need: UFT Add-in where ALM client is installed. UFT Add-in and ALM connectivity Add-in where UFT is installed. ALM connectivity can be found: > Add-Ins Page > HP Quality Center Connectivity > Download Add-in UFT Add-in can be found: > Add-Ins Page > More ALM Add-ins > Add-ins > Unified Functional Testing > Download UFT Add-in (according to UFT version). Install the UFT Add-in. Configure UFT for Connectivity: Open UFT. Go to Tools > Options > Run Sessions > Check "Allow UFT to continue running GUI or business process tests after disconnecting from an RDP computer" Enter the credentials for the remote computer. User Name: Password: Steps to Connect to ALM Project from UFT: Open UFT. Go to ALM > ALM Connection... (Ctrl+Q). HP ALM Connection dialogue box open. Connect to server: Put Server URL, User Name, and Password. Click Connect. Login to project: Put Domain, Project. Check the box marked "Restore connection on start-up" Click Login Storing Scripts in ALM After creating manual test case, you can generate a test script skeleton in which you can write scripts to run the test as an automated test. To generate an automated test script: 1. In the Test Plan tree, choose the manual test that you want to automate. 2. Click the Design Steps tab and click the Generate Script button and Choose QUICKTEST_TEST 3. Click on tab Test Script, any text that appeared in the steps of the manual test is listed as comments in the generated test script. If the manual test has parameters, they are also listed as comment text 4. Launch UFT tool by clicking UFT icon, it will launch UFT and open current test script in expert view. By: Noor Hossin Web: [email protected] Page: 103

104 5. Write and update test script, changes would be saved in ALM in Test Plan module. Or we can export test Script from UFT to ALM for that need to first establish UFT- ALM connection 1. In UFT, Go to ALM > ALM Connection.. 2. Enter ALM URL, username, password, project name, domain and click on Login. UFT is now connected to ALM. 3. Next you can select the save the UFT Script in ALM. In UFT, Select File > Save Test As > ALM Test Plan 4. Select/Create the Folder in ALM where you want to save the UFT Script. 5. Put File name and Click to Save. Storing UFT Resources in ALM This is a key area in our framework, UFT resources are the ones to which UFT scripts are associated and referenced during their execution. Below are the classification of UFT resources: 1. Function Library 2. Object Repository 3. Recovery Scenario 4. Environment File 5. Data Tables The Test Resources module in ALM enables you to manage resources used by your tests. You can organize your resources by defining a hierarchical test resource tree containing resource folders and resources. For each resource in the tree, you select and upload a set of resource files to the Quality Center repository. These files can be used by one or more tests Running UFT script from ALM The Test Lab module in ALM enables you to control the execution of the tests. 1. Select the Test Lab tab in ALM. 2. Click on "Select Test" button. 3. On the left hand side list of test scripts appear. 4. Drag and drop each of the test script of each scenario into the test set. 5. Select all of them from the test set. 6. Click on Run button. 7. Another dialog box opens, Click on "Run All" button in that dialog box Continuous Integration Using Jenkins Jenkins is an award-winning application that monitors executions of repeated jobs, such as building a software project or jobs run by cron. Among those things, current Jenkins focuses on the following two jobs: Building/Testing Software Projects Continuously, just like CruiseControl or DamageControl. In a nutshell, Jenkins provides an easyto-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity. By: Noor Hossin Web: [email protected] Page: 104

105 Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those that are run on a remote machine. For example, with cron, all you receive is regular s that capture the output, and it is up to you to look at them diligently and notice when it broke. Jenkins keeps those outputs and makes it easy for you to notice when something is wrong. Installation of Jenkins If you're running on Windows it is good to run Jenkins as a service so it starts up automatically without requiring a user to log in. The easiest way is to run the Windows installer, linked from Jenkins' homepage This also has the advantage of being easier to automate. The manual way is to follow Executing Automated UFT Tests from Jenkins Once, you are able to open the Jenkins server, Click on "New Item". Provide any Item name, select "freestyle project" and click on "OK" button Once, you click on OK button, New Job configuration page will open. This is the main configuration page, where we will provide all of the configuration details about how the Job should execute. Fill out the following information within the job configuration page: 1. Description: Description about the job and the UFT test which is tied to this job. 2. Check on "Restrict where this project can be run" and provide the slave machine name with UFT installed. This is very important step, because otherwise Jenkins will choose a slave machine randomly, and might choose Jenkins master machine (where Jenkins is installed) for execution. This will cause the job to fail. 3. Select appropriate build triggers, if you are using any source code control for storing UFT tests (Except ALM) e.g. GIT, SVN, TFS. 4. Under Build environment select "delete workspace before build starts". This will help us in cleaning up the workspace and have a fresh start for each execution. 5. Click on Add build step button under build and select "Execute HP Tests from file system". This will allow you to execute the tests from file system e.g. "C:\" or network drives. 6. Provide UFT tests or Solution path in the "Tests" textbox. If you provide UFT s solution file path then all tests under solution will be executed one after another. Leave Time out seconds blank. 7. Click on "Add post build action" under post build actions, and select "Publish HP test results". Select "Always Archieve HP test Reports". This step will generate and archive Junit results for the execution on the jenkins server, which can be used for analysis. we will discuss about this in detail later. 8. If you have configured the server then Add another post build step and "Editable notification". This option will send automated s after the By: Noor Hossin Web: [email protected] Page: 105

106 execution is over. We can attach any files in the or we can send any files as the part of the body. After filling out the above information, Click on Save button and start the job by clicking on "Build now" button within job details page. Once the execution is started, click on Build number, under build history, to check the current execution details. While the test is executing, you can click on Console output, to check the current execution status. Once the execution is completed, you can see the test results on the Build page, under test results. Executing Tests from ALM For running tests from ALM, you have to make three changes to the current configuration explained above. 1. Add ALM Server: Open Jenkins > Manage Jenkins > Configure System and find the sub section "Application Lifecycle Management". Click on "Add ALM Server" button. Provide the server name as Test or Prod or Dev and enter the server URL till qcbin. Click on save and apply. You can add multiple ALM Servers. 2. Use "Execute HP Functional test from HP ALM" instead of "Execute HP tests from file system". Add the Build Step "Execute HP Functional test from file system". Select ALM Server name from the "ALM Server" combobox. Provide Username, password, Domain, project and Test Set Path for the execution of the tests. Test set path is the actual physical path which you see in the ALM test lab tree structure starting with Root\ 3. Check the advanced setting, if you want to execute the tests on specific host defined in ALM. When you execute your tests from ALM Server, you will see one change in the Console output, you will start seeing all of the Reporter.reportevent statements on the Jenkins console log. This feature can be used to check the current progress of the execution. Test execution status will be uploaded automatically to ALM Server. For more details, Send Using MS Outlook Attach a file with the ; send the file to the team members using MS Outlook. *******Send Using Outlook******' Function Send FromOutlook( to, cc, bcc, sub, body,path) Set ObjOutlook = CreateObject("Outlook.Application") Set mymail = ObjOutlook.CreateItem(0) 'Set the properties mymail.to = to mymail.cc = cc mymail.bcc = bcc mymail.subject = sub By: Noor Hossin Web: [email protected] Page: 106

107 mymail.body= body mymail.attachments.add(path) 'Path of the file to be attached mymail.send Wait(3) 'Clear object reference Set mymail = Nothing Set ObjOutlook = Nothing End Function Send FromOutlook "[email protected]","[email protected]","[email protected]","sending mail from MS Outlook using QTP"," Drive\Useful Website.docx" Find the Row Where TestCase is Located Search for the Excel Worksheet and Find the Row where the TestCase is located: Set excel=createobject ("Excel.Application") Set wb=excel.workbooks.open("e:\peoplentech\docs\testdata.xlsx") Set ws=wb.worksheets("testcases") For i = 1 To ws.usedrange.rows.count Step 1 If (ws.cells(i,"a")=environment.value("testname")) Then MsgBox i 'Test Name MsgBox ws.cells(i,"c") 'Test Data 1 MsgBox ws.cells(i,"d") 'Test Data 2 End If Next wb.close excel.quit Close all the Open Browsers Write a Function that would close all the open browsers except the browser specified by the title provided as input argument to the Function. Note: You would need this in real time, because you need to have QC/ALM browser ignored by your close all browsers function. Using ChildObjects &.Close Method uses a Browser Description Object and a loop to close all Browsers in the collection. To close all browser except Quality center, use following code Steps: Create a Browser object. Loop and Check if a browser is open. Close the browser if it's not Quality center. 'Close all Browsers except Quality Center Function CloseBrowser Set ObjCloseBrowser=Description.Create ObjCloseBrowser("micclass").Value="Browser" Set OpenBrowser=Desktop.ChildObjects(ObjCloseBrowser) Print OpenBrowser.count For i = 0 to OpenBrowser.count-1 IF (OpenBrowser(i).getRoProperty("title"))<>"HP ALM - Quality Center 11.00" Then OpenBrowser(i).Close End If Next End Function CloseBrowser By: Noor Hossin Web: [email protected] Page: 107

108 More on - -count-and-names-of-all-open-browsers/8-qtp-webbased Built In Method in UFT ExitTest - Exits the entire Test. ExitRun - is an obsolete (not supported now in newer versions or supported for backward compatibilty) ExitTest is the alternative for this. ExitTestIteration - Exits the current iteration of the test Get count and names of all open Browsers and Links Open Browser: To retrieve all browsers open with their name, use code steps. A. Create a Browser Object B. Get all Browser Opened C. Display Opened Browser Title Set odesc=description.create odesc("micclass").value="browser" Set obrowser=desktop.childobjects(odesc) 'create browser object Print obrowser.count 'get all browser opened For i = 0 To obrowser.count-1 Step 1 Print obrowser(i).getroproperty("title") 'display browser title Next Count Links: To Count all the links with title, use code steps. A. Create a Link Object B. Get all Link on the Page C. Display Link Text Set chlink=description.create chlink("micclass").value="link" 'create link object Set totlink=browser("title:=.*").page("title:=.*").childobjects(chlink) Print totlink.count 'get all links For i = 0 To totlink.count-1 Step 1 Print totlink(i).getroproperty("innertext") 'display link title Next By: Noor Hossin Web: [email protected] Page: 108

SOFTWARE TESTING TRAINING COURSES CONTENTS

SOFTWARE TESTING TRAINING COURSES CONTENTS SOFTWARE TESTING TRAINING COURSES CONTENTS 1 Unit I Description Objectves Duration Contents Software Testing Fundamentals and Best Practices This training course will give basic understanding on software

More information

Basics of Automation and Overview of QTP. By, Anver Sathic Abdul Subhan

Basics of Automation and Overview of QTP. By, Anver Sathic Abdul Subhan Basics of Automation and Overview of QTP By, Anver Sathic Abdul Subhan AGENDA Manual Testing Con s Automation Testing Pro s and Con s Automation Testing tools Automation Planning QTP at a Glance & Add-In

More information

Desktop, Web and Mobile Testing Tutorials

Desktop, Web and Mobile Testing Tutorials Desktop, Web and Mobile Testing Tutorials * Windows and the Windows logo are trademarks of the Microsoft group of companies. 2 About the Tutorial With TestComplete, you can test applications of three major

More information

Business Application Services Testing

Business Application Services Testing Business Application Services Testing Curriculum Structure Course name Duration(days) Express 2 Testing Concept and methodologies 3 Introduction to Performance Testing 3 Web Testing 2 QTP 5 SQL 5 Load

More information

Know the Difference. Unified Functional Testing (UFT) and Lean Functional Testing (LeanFT) from HP

Know the Difference. Unified Functional Testing (UFT) and Lean Functional Testing (LeanFT) from HP Know the Difference Unified Functional Testing (UFT) and Lean Functional Testing (LeanFT) from HP 1 Copyright 2015 Hewlett-Packard Development Company, L.P. The information contained herein is subject

More information

What s new in the HP Functional Testing 11.5 suite Ronit Soen, product marketing John Jeremiah, product marketing

What s new in the HP Functional Testing 11.5 suite Ronit Soen, product marketing John Jeremiah, product marketing What s new in the HP Functional Testing 11.5 suite Ronit Soen, product marketing John Jeremiah, product marketing Today s agenda A new world order for applications impact on QA HP s response announcement

More information

Automation and Virtualization, the pillars of Continuous Testing

Automation and Virtualization, the pillars of Continuous Testing HP Software: Apps meet Ops 2015 Automation and Virtualization, the pillars of Continuous Testing Jerry Saelemakers/ April 2 nd, 2015 Today s business initiatives demand a balance between velocity and quality

More information

International Journal of Advanced Engineering Research and Science (IJAERS) Vol-2, Issue-11, Nov- 2015] ISSN: 2349-6495

International Journal of Advanced Engineering Research and Science (IJAERS) Vol-2, Issue-11, Nov- 2015] ISSN: 2349-6495 International Journal of Advanced Engineering Research and Science (IJAERS) Vol-2, Issue-11, Nov- 2015] Survey on Automation Testing Tools for Mobile Applications Dr.S.Gunasekaran 1, V. Bargavi 2 1 Department

More information

LoadRunner and Performance Center v11.52 Technical Awareness Webinar Training

LoadRunner and Performance Center v11.52 Technical Awareness Webinar Training LoadRunner and Performance Center v11.52 Technical Awareness Webinar Training Tony Wong 1 Copyright Copyright 2012 2012 Hewlett-Packard Development Development Company, Company, L.P. The L.P. information

More information

Testhouse Training Portfolio

Testhouse Training Portfolio Testhouse Training Portfolio TABLE OF CONTENTS Table of Contents... 1 HP LoadRunner 4 Days... 2 ALM Quality Center 11-2 Days... 7 HP QTP Training Course 2 Days... 10 QTP/ALM Intensive Training Course 4

More information

Software Automated Testing

Software Automated Testing Software Automated Testing Keyword Data Driven Framework Selenium Robot Best Practices Agenda ² Automation Engineering Introduction ² Keyword Data Driven ² How to build a Test Automa7on Framework ² Selenium

More information

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip Load testing with WAPT: Quick Start Guide This document describes step by step how to create a simple typical test for a web application, execute it and interpret the results. A brief insight is provided

More information

HP LoadRunner. Software Version: 12.50. LoadRunner Tutorial

HP LoadRunner. Software Version: 12.50. LoadRunner Tutorial HP LoadRunner Software Version: 12.50 LoadRunner Tutorial Document Release Date: August 2015 Software Release Date: August 2015 Legal Notices Warranty The only warranties for HP products and services are

More information

user guide version 4.1

user guide version 4.1 user guide version 4.1 No Magic, Inc. 2010 All material contained herein is considered proprietary information owned by No Magic, Inc. and is not to be shared, copied, or reproduced by any means. All information

More information

HP ALM. Software Version: 12.50. Tutorial

HP ALM. Software Version: 12.50. Tutorial HP ALM Software Version: 12.50 Tutorial Document Release Date: December 2015 Software Release Date: December 2015 Legal Notices Warranty The only warranties for HP products and services are set forth in

More information

14.1. bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë

14.1. bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë 14.1 bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë bî~äì~íáåö=oéñäéåíáçå=ñçê=emi=rkfui=~åç=lééåsjp=eçëíë This guide walks you quickly through key Reflection features. It covers: Getting Connected

More information

Cloud Storage Service

Cloud Storage Service Cloud Storage Service User Guide (Web Interface, Android App) Table of Content System Requirements...4 1.1Web Browser... 4 1.2Mobile Apps... 4 Accessing Cloud Storage using a Web Browser... 4 The Web Home

More information

DiskPulse DISK CHANGE MONITOR

DiskPulse DISK CHANGE MONITOR DiskPulse DISK CHANGE MONITOR User Manual Version 7.9 Oct 2015 www.diskpulse.com [email protected] 1 1 DiskPulse Overview...3 2 DiskPulse Product Versions...5 3 Using Desktop Product Version...6 3.1 Product

More information

This document is provided to you by ABC E BUSINESS, Microsoft Dynamics Preferred partner. System Requirements NAV 2016

This document is provided to you by ABC E BUSINESS, Microsoft Dynamics Preferred partner. System Requirements NAV 2016 This document is provided to you by ABC E BUSINESS, Microsoft Dynamics Preferred partner. System Requirements NAV 2016 Page 1 System Requirements NAV 2016 Microsoft Dynamics NAV Windows Client Requirements

More information

Citrix EdgeSight for Load Testing User s Guide. Citrix EdgeSight for Load Testing 3.8

Citrix EdgeSight for Load Testing User s Guide. Citrix EdgeSight for Load Testing 3.8 Citrix EdgeSight for Load Testing User s Guide Citrix EdgeSight for Load Testing 3.8 Copyright Use of the product documented in this guide is subject to your prior acceptance of the End User License Agreement.

More information

Attix5 Pro Server Edition

Attix5 Pro Server Edition Attix5 Pro Server Edition V7.0.3 User Manual for Linux and Unix operating systems Your guide to protecting data with Attix5 Pro Server Edition. Copyright notice and proprietary information All rights reserved.

More information

http://docs.trendmicro.com

http://docs.trendmicro.com Trend Micro Incorporated reserves the right to make changes to this document and to the products described herein without notice. Before installing and using the product, please review the readme files,

More information

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY A PATH FOR HORIZING YOUR INNOVATIVE WORK A SYSTEMATIC REVIEW OF AUTOMATED SOFTWARE TESTING TOOLS A. NIRMAL KUMAR 1, DR.

More information

System Administration Training Guide. S100 Installation and Site Management

System Administration Training Guide. S100 Installation and Site Management System Administration Training Guide S100 Installation and Site Management Table of contents System Requirements for Acumatica ERP 4.2... 5 Learning Objects:... 5 Web Browser... 5 Server Software... 5

More information

System Requirements for Microsoft Dynamics NAV 2016

System Requirements for Microsoft Dynamics NAV 2016 1 of 13 19.01.2016 17:52 System Requirements for Microsoft Dynamics NAV 2016 Microsoft Dynamics NAV 2016 The following sections list the minimum hardware and software requirements to install and run Microsoft

More information

System Requirements for Microsoft Dynamics NAV 2016

System Requirements for Microsoft Dynamics NAV 2016 System Requirements for Microsoft Dynamics NAV 2016 Microsoft Dynamics NAV 2016 The following sections list the minimum hardware and software requirements to install and run Microsoft Dynamics NAV 2016.

More information

Attix5 Pro Server Edition

Attix5 Pro Server Edition Attix5 Pro Server Edition V7.0.2 User Manual for Mac OS X Your guide to protecting data with Attix5 Pro Server Edition. Copyright notice and proprietary information All rights reserved. Attix5, 2013 Trademarks

More information

What's New in BarTender 2016

What's New in BarTender 2016 What's New in BarTender 2016 WHITE PAPER Contents Introduction 3 64-bit BarTender Installation 3 Data Entry Forms 3 BarTender Integration Builder 3 BarTender Print Portal 3 Other Upgrades 3 64-bit BarTender

More information

Load testing with. WAPT Cloud. Quick Start Guide

Load testing with. WAPT Cloud. Quick Start Guide Load testing with WAPT Cloud Quick Start Guide This document describes step by step how to create a simple typical test for a web application, execute it and interpret the results. 2007-2015 SoftLogica

More information

DiskBoss. File & Disk Manager. Version 2.0. Dec 2011. Flexense Ltd. www.flexense.com [email protected]. File Integrity Monitor

DiskBoss. File & Disk Manager. Version 2.0. Dec 2011. Flexense Ltd. www.flexense.com info@flexense.com. File Integrity Monitor DiskBoss File & Disk Manager File Integrity Monitor Version 2.0 Dec 2011 www.flexense.com [email protected] 1 Product Overview DiskBoss is an automated, rule-based file and disk manager allowing one to

More information

System Requirements. Microsoft Dynamics NAV 2016

System Requirements. Microsoft Dynamics NAV 2016 System Requirements Microsoft Dynamics NAV 2016 Contents System Requirements for Microsoft Dynamics NAV 2016... 4 Microsoft Dynamics NAV Windows Client Requirements... 5 Microsoft Dynamics NAV Development

More information

StrikeRisk v6.0 IEC/EN 62305-2 Risk Management Software Getting Started

StrikeRisk v6.0 IEC/EN 62305-2 Risk Management Software Getting Started StrikeRisk v6.0 IEC/EN 62305-2 Risk Management Software Getting Started Contents StrikeRisk v6.0 Introduction 1/1 1 Installing StrikeRisk System requirements Installing StrikeRisk Installation troubleshooting

More information

Desktop Surveillance Help

Desktop Surveillance Help Desktop Surveillance Help Table of Contents About... 9 What s New... 10 System Requirements... 11 Updating from Desktop Surveillance 2.6 to Desktop Surveillance 3.2... 13 Program Structure... 14 Getting

More information

QEx Whitepaper. Automation Testing Pillar: Selenium. Naveen Saxena. AuthOr: www.hcltech.com

QEx Whitepaper. Automation Testing Pillar: Selenium. Naveen Saxena. AuthOr: www.hcltech.com www.hcltech.com QEx Whitepaper Automation Testing Pillar: Selenium Business Assurance & Testing AuthOr: Naveen Saxena Working as a Test Lead, Center of Excellence Group, with HCL Technologies. Has immense

More information

SIMIAN systems. Sitellite Desktop User Manual. Sitellite Professional Edition

SIMIAN systems. Sitellite Desktop User Manual. Sitellite Professional Edition Sitellite Desktop User Manual Sitellite Professional Edition Introduction The Sitellite Desktop is a cross-platform desktop application that can manage one or more Sitellite 5-powered websites in a more

More information

vtcommander Installing and Starting vtcommander

vtcommander Installing and Starting vtcommander vtcommander vtcommander provides a local graphical user interface (GUI) to manage Hyper-V R2 server. It supports Hyper-V technology on full and core installations of Windows Server 2008 R2 as well as on

More information

Test Automation Integration with Test Management QAComplete

Test Automation Integration with Test Management QAComplete Test Automation Integration with Test Management QAComplete This User's Guide walks you through configuring and using your automated tests with QAComplete's Test Management module SmartBear Software Release

More information

System Requirements for Microsoft Dynamics NAV 2016

System Requirements for Microsoft Dynamics NAV 2016 Page 1 of 7 System Requirements for Microsoft Dynamics NAV 2016 Microsoft Dynamics NAV 2016 The following sections list the minimum hardware and software requirements to install and run Microsoft Dynamics

More information

Getting started with API testing

Getting started with API testing Technical white paper Getting started with API testing Test all layers of your composite applications, not just the GUI Table of contents Executive summary... 3 Introduction... 3 Who should read this document?...

More information

Business Insight Report Authoring Getting Started Guide

Business Insight Report Authoring Getting Started Guide Business Insight Report Authoring Getting Started Guide Version: 6.6 Written by: Product Documentation, R&D Date: February 2011 ImageNow and CaptureNow are registered trademarks of Perceptive Software,

More information

Viewpoint. Choosing the right automation tool and framework is critical to project success. - Harsh Bajaj, Technical Test Lead ECSIVS, Infosys

Viewpoint. Choosing the right automation tool and framework is critical to project success. - Harsh Bajaj, Technical Test Lead ECSIVS, Infosys Viewpoint Choosing the right automation tool and framework is critical to project success - Harsh Bajaj, Technical Test Lead ECSIVS, Infosys Introduction Organizations have become cognizant of the crucial

More information

ORACLE USER PRODUCTIVITY KIT V3.6.1 TECHNICAL SPECIFICATIONS (WITH ENABLEMENT SERVICE PACK 3)

ORACLE USER PRODUCTIVITY KIT V3.6.1 TECHNICAL SPECIFICATIONS (WITH ENABLEMENT SERVICE PACK 3) ORACLE USER PRODUCTIVITY KIT V3.6.1 TECHNICAL SPECIFICATIONS (WITH ENABLEMENT SERVICE PACK 3) KEY FEATURES AND BENEFITS DRIVE USER PRODUCTIVITY AND MITIGATE RISK. FEATURES Single, synchronized authoring

More information

Zoom Plug-ins for Adobe

Zoom Plug-ins for Adobe = Zoom Plug-ins for Adobe User Guide Copyright 2010 Evolphin Software. All rights reserved. Table of Contents Table of Contents Chapter 1 Preface... 4 1.1 Document Revision... 4 1.2 Audience... 4 1.3 Pre-requisite...

More information

Automation using Selenium

Automation using Selenium Table of Contents 1. A view on Automation Testing... 3 2. Automation Testing Tools... 3 2.1 Licensed Tools... 3 2.1.1 Market Growth & Productivity... 4 2.1.2 Current Scenario... 4 2.2 Open Source Tools...

More information

ORACLE BUSINESS INTELLIGENCE WORKSHOP

ORACLE BUSINESS INTELLIGENCE WORKSHOP ORACLE BUSINESS INTELLIGENCE WORKSHOP Integration of Oracle BI Publisher with Oracle Business Intelligence Enterprise Edition Purpose This tutorial mainly covers how Oracle BI Publisher is integrated with

More information

5nine Hyper-V Commander

5nine Hyper-V Commander 5nine Hyper-V Commander 5nine Hyper-V Commander provides a local graphical user interface (GUI), and a Framework to manage Hyper-V R2 server and various functions such as Backup/DR, HA and P2V/V2V. It

More information

Citrix EdgeSight for Load Testing User s Guide. Citrx EdgeSight for Load Testing 2.7

Citrix EdgeSight for Load Testing User s Guide. Citrx EdgeSight for Load Testing 2.7 Citrix EdgeSight for Load Testing User s Guide Citrx EdgeSight for Load Testing 2.7 Copyright Use of the product documented in this guide is subject to your prior acceptance of the End User License Agreement.

More information

WebSpy Vantage Ultimate 2.2 Web Module Administrators Guide

WebSpy Vantage Ultimate 2.2 Web Module Administrators Guide WebSpy Vantage Ultimate 2.2 Web Module Administrators Guide This document is intended to help you get started using WebSpy Vantage Ultimate and the Web Module. For more detailed information, please see

More information

HP LoadRunner. Software Version: 11.00. Ajax TruClient Tips & Tricks

HP LoadRunner. Software Version: 11.00. Ajax TruClient Tips & Tricks HP LoadRunner Software Version: 11.00 Ajax TruClient Tips & Tricks Document Release Date: October 2010 Software Release Date: October 2010 Legal Notices Warranty The only warranties for HP products and

More information

Manuals for This Product

Manuals for This Product Installation Guide Manuals for This Product Manuals for this product have the following structure. Read the manual according to your purpose for using this product. Disc Guides with this symbol are PDF

More information

Sage Intelligence Financial Reporting for Sage ERP X3 Version 6.5 Installation Guide

Sage Intelligence Financial Reporting for Sage ERP X3 Version 6.5 Installation Guide Sage Intelligence Financial Reporting for Sage ERP X3 Version 6.5 Installation Guide Table of Contents TABLE OF CONTENTS... 3 1.0 INTRODUCTION... 1 1.1 HOW TO USE THIS GUIDE... 1 1.2 TOPIC SUMMARY...

More information

Sage ERP MAS 90 Sage ERP MAS 200 Sage ERP MAS 200 SQL. Installation and System Administrator's Guide 4MASIN450-08

Sage ERP MAS 90 Sage ERP MAS 200 Sage ERP MAS 200 SQL. Installation and System Administrator's Guide 4MASIN450-08 Sage ERP MAS 90 Sage ERP MAS 200 Sage ERP MAS 200 SQL Installation and System Administrator's Guide 4MASIN450-08 2011 Sage Software, Inc. All rights reserved. Sage, the Sage logos and the Sage product

More information

Integrated Virtual Debugger for Visual Studio Developer s Guide VMware Workstation 8.0

Integrated Virtual Debugger for Visual Studio Developer s Guide VMware Workstation 8.0 Integrated Virtual Debugger for Visual Studio Developer s Guide VMware Workstation 8.0 This document supports the version of each product listed and supports all subsequent versions until the document

More information

www.hcltech.com Business Assurance & Testing QEx Automation Platform

www.hcltech.com Business Assurance & Testing QEx Automation Platform www.hcltech.com Business Assurance & Testing QEx Automation Platform MARKET NEED Increasing application complexities and shorter release cycles have made it imperative to test new features whilst performing

More information

Table of Contents. Introduction...9. Installation...17. Program Tour...31. The Program Components...10 Main Program Features...11

Table of Contents. Introduction...9. Installation...17. Program Tour...31. The Program Components...10 Main Program Features...11 2011 AdRem Software, Inc. This document is written by AdRem Software and represents the views and opinions of AdRem Software regarding its content, as of the date the document was issued. The information

More information

NETWRIX FILE SERVER CHANGE REPORTER

NETWRIX FILE SERVER CHANGE REPORTER NETWRIX FILE SERVER CHANGE REPORTER ADMINISTRATOR S GUIDE Product Version: 3.3 April/2012. Legal Notice The information in this publication is furnished for information use only, and does not constitute

More information

Web Conferencing Version 8.3 Troubleshooting Guide

Web Conferencing Version 8.3 Troubleshooting Guide System Requirements General Requirements Web Conferencing Version 8.3 Troubleshooting Guide Listed below are the minimum requirements for participants accessing the web conferencing service. Systems which

More information

SysPatrol - Server Security Monitor

SysPatrol - Server Security Monitor SysPatrol Server Security Monitor User Manual Version 2.2 Sep 2013 www.flexense.com www.syspatrol.com 1 Product Overview SysPatrol is a server security monitoring solution allowing one to monitor one or

More information

Generating lesson plans with. Adobe Acrobat

Generating lesson plans with. Adobe Acrobat Generating lesson plans with Adobe Acrobat Introduction Being a teacher requires so many non-teaching administrative tasks that sometimes just teaching gets lost in the paper shuffle. You can automate

More information

VX Search File Search Solution. VX Search FILE SEARCH SOLUTION. User Manual. Version 8.2. Jan 2016. www.vxsearch.com [email protected]. Flexense Ltd.

VX Search File Search Solution. VX Search FILE SEARCH SOLUTION. User Manual. Version 8.2. Jan 2016. www.vxsearch.com info@flexense.com. Flexense Ltd. VX Search FILE SEARCH SOLUTION User Manual Version 8.2 Jan 2016 www.vxsearch.com [email protected] 1 1 Product Overview...4 2 VX Search Product Versions...8 3 Using Desktop Product Versions...9 3.1 Product

More information

InstaFile. Complete Document management System

InstaFile. Complete Document management System InstaFile Complete Document management System Index : About InstaFile 1.1 What is InstaFile 1.2 How does it work 1.3 Where you can use InstaFile 1.4 Why only InstaFile InstaFile features and benefits Start

More information

EasyMP Multi PC Projection Operation Guide

EasyMP Multi PC Projection Operation Guide EasyMP Multi PC Projection Operation Guide Contents Introduction to EasyMP Multi PC Projection... 7 EasyMP Multi PC Projection Features... 7 Connection to Various Devices... 7 Four-Panel Display... 8

More information

BarTender Web Print Server

BarTender Web Print Server The World's Leading Software for Label, Barcode, RFID & Card Printing White Paper BarTender Web Print Server Web-based Software for Printing Barcodes, Labels, ID Cards and more. Contents Introduction to

More information

Quick Start Guide Mobile Entrée 4

Quick Start Guide Mobile Entrée 4 Table of Contents Table of Contents... 1 Installation... 2 Obtaining the Installer... 2 Installation Using the Installer... 2 Site Configuration... 2 Feature Activation... 2 Definition of a Mobile Application

More information

VEEAM ONE 8 RELEASE NOTES

VEEAM ONE 8 RELEASE NOTES VEEAM ONE 8 RELEASE NOTES This Release Notes document provides last-minute information about Veeam ONE 8 Update 2, including system requirements, installation instructions as well as relevant information

More information

Features of AnyShare

Features of AnyShare of AnyShare of AnyShare CONTENT Brief Introduction of AnyShare... 3 Chapter 1 Centralized Management... 5 1.1 Operation Management... 5 1.2 User Management... 5 1.3 User Authentication... 6 1.4 Roles...

More information

SAP BusinessObjects Business Intelligence Platform Document Version: 4.1 Support Package 5-2014-11-06. Business Intelligence Launch Pad User Guide

SAP BusinessObjects Business Intelligence Platform Document Version: 4.1 Support Package 5-2014-11-06. Business Intelligence Launch Pad User Guide SAP BusinessObjects Business Intelligence Platform Document Version: 4.1 Support Package 5-2014-11-06 Business Intelligence Launch Pad User Guide Table of Contents 1 Document history....7 2 Getting started

More information

HP Enterprise Integration module for SAP applications

HP Enterprise Integration module for SAP applications HP Enterprise Integration module for SAP applications Software Version: 2.50 User Guide Document Release Date: May 2009 Software Release Date: May 2009 Legal Notices Warranty The only warranties for HP

More information

What is OneDrive for Business at University of Greenwich? Accessing OneDrive from Office 365

What is OneDrive for Business at University of Greenwich? Accessing OneDrive from Office 365 This guide explains how to access and use the OneDrive for Business cloud based storage system and Microsoft Office Online suite of products via a web browser. What is OneDrive for Business at University

More information

SHARP Digital Signage Software Pro PN-SS05 OPERATION MANUAL

SHARP Digital Signage Software Pro PN-SS05 OPERATION MANUAL SHARP Digital Signage Software Pro PN-SS05 Version 4.1 OPERATION MANUAL Contents Introduction... 2 Precautions on Use...2 Trademarks...2 How to Read this Manual...3 Definitions...3 Installing/Launching...

More information

SC-T35/SC-T45/SC-T46/SC-T47 ViewSonic Device Manager User Guide

SC-T35/SC-T45/SC-T46/SC-T47 ViewSonic Device Manager User Guide SC-T35/SC-T45/SC-T46/SC-T47 ViewSonic Device Manager User Guide Copyright and Trademark Statements 2014 ViewSonic Computer Corp. All rights reserved. This document contains proprietary information that

More information

Copyrighted www.eh1infotech.com +919780265007, 0172-5098107 Address :- EH1-Infotech, SCF 69, Top Floor, Phase 3B-2, Sector 60, Mohali (Chandigarh),

Copyrighted www.eh1infotech.com +919780265007, 0172-5098107 Address :- EH1-Infotech, SCF 69, Top Floor, Phase 3B-2, Sector 60, Mohali (Chandigarh), Content of 6 Months Software Testing Training at EH1-Infotech Module 1: Introduction to Software Testing Basics of S/W testing Module 2: SQA Basics Testing introduction and terminology Verification and

More information

Network Administrator s Guide and Getting Started with Autodesk Ecotect Analysis

Network Administrator s Guide and Getting Started with Autodesk Ecotect Analysis Autodesk Ecotect Analysis 2011 Network Administrator s Guide and Getting Started with Autodesk Ecotect Analysis This document describes how to install and activate Autodesk Ecotect Analysis 2011 software

More information

Getting Started with Vision 6

Getting Started with Vision 6 Getting Started with Vision 6 Version 6.9 Notice Copyright 1981-2009 Netop Business Solutions A/S. All Rights Reserved. Portions used under license from third parties. Please send any comments to: Netop

More information

Bitrix Site Manager ASP.NET. Installation Guide

Bitrix Site Manager ASP.NET. Installation Guide Bitrix Site Manager ASP.NET Installation Guide Contents Introduction... 4 Chapter 1. Checking for IIS Installation... 5 Chapter 2. Using An Archive File to Install Bitrix Site Manager ASP.NET... 7 Preliminary

More information

CRM Quick Reference Guide

CRM Quick Reference Guide CRM Quick Reference Guide AMS Distributor Customers 2013 Internet Pipeline, Inc. All rights reserved. Information in this document is subject to change without notice. The software described in this document

More information

SYSTRAN v6 Quick Start Guide

SYSTRAN v6 Quick Start Guide SYSTRAN v6 Quick Start Guide 2 SYSTRAN v6 Quick Start Guide SYSTRAN Business Translator SYSTRAN Premium Translator Congratulations on your SYSTRAN v6 purchase which uses the latest generation of language

More information

Troubleshooting AVAYA Meeting Exchange

Troubleshooting AVAYA Meeting Exchange Troubleshooting AVAYA Meeting Exchange Is my browser supported? Avaya Web Conferencing supports the following browser clients for joining conferences (with the described limitations). The supported browsers

More information

Top 10 Oracle SQL Developer Tips and Tricks

Top 10 Oracle SQL Developer Tips and Tricks Top 10 Oracle SQL Developer Tips and Tricks December 17, 2013 Marc Sewtz Senior Software Development Manager Oracle Application Express Oracle America Inc., New York, NY The following is intended to outline

More information

HP Application Lifecycle Management (ALM)

HP Application Lifecycle Management (ALM) HP Application Lifecycle Management (ALM) Knowledge Share Maheshwar Salendra Date : 12/02/2012 AGENDA: Introduction to ALM ALM Functionality by Edition ALM Home page Side bars: Management Requirements

More information

Perfect Your Mobile App with Load Testing and Test Automation

Perfect Your Mobile App with Load Testing and Test Automation Wipro & Experitest Co-webinar: Perfect Your Mobile App with Load Testing and Test Automation June 2015 Speakers Guy Arieli CTO Experitest Sudheer Mohan Director - Mobility Certification & Automation Wipro

More information

INTRODUCTION TO ATRIUM... 2 SYSTEM REQUIREMENTS... 2 TECHNICAL DETAILS... 2 LOGGING INTO ATRIUM... 3 SETTINGS... 4 NAVIGATION PANEL...

INTRODUCTION TO ATRIUM... 2 SYSTEM REQUIREMENTS... 2 TECHNICAL DETAILS... 2 LOGGING INTO ATRIUM... 3 SETTINGS... 4 NAVIGATION PANEL... INTRODUCTION TO ATRIUM... 2 SYSTEM REQUIREMENTS... 2 TECHNICAL DETAILS... 2 LOGGING INTO ATRIUM... 3 SETTINGS... 4 CONTROL PANEL... 4 ADDING GROUPS... 6 APPEARANCE... 7 BANNER URL:... 7 NAVIGATION... 8

More information

Attix5 Pro. Your guide to protecting data with Attix5 Pro Desktop & Laptop Edition. V6.0 User Manual for Mac OS X

Attix5 Pro. Your guide to protecting data with Attix5 Pro Desktop & Laptop Edition. V6.0 User Manual for Mac OS X Attix5 Pro Your guide to protecting data with Attix5 Pro Desktop & Laptop Edition V6.0 User Manual for Mac OS X Copyright Notice and Proprietary Information All rights reserved. Attix5, 2011 Trademarks

More information

Foxit Reader Deployment and Configuration

Foxit Reader Deployment and Configuration Copyright 2004-2015 Foxit Software Incorporated. All Rights Reserved. No part of this document can be reproduced, transferred, distributed or stored in any format without the prior written permission of

More information

Microsoft Dynamics NAV 2015 Hardware and Server Requirements. Microsoft Dynamics NAV Windows Client Requirements

Microsoft Dynamics NAV 2015 Hardware and Server Requirements. Microsoft Dynamics NAV Windows Client Requirements Microsoft Dynamics NAV 2015 Hardware and Server Requirements Microsoft Dynamics NAV Windows Client Requirements Windows client. operating systems Hardware resources Reports Windows 8.1 Professional or

More information

Quick start. A project with SpagoBI 3.x

Quick start. A project with SpagoBI 3.x Quick start. A project with SpagoBI 3.x Summary: 1 SPAGOBI...2 2 SOFTWARE DOWNLOAD...4 3 SOFTWARE INSTALLATION AND CONFIGURATION...5 3.1 Installing SpagoBI Server...5 3.2Installing SpagoBI Studio and Meta...6

More information

JetBrains ReSharper 2.0 Overview Introduction ReSharper is undoubtedly the most intelligent add-in to Visual Studio.NET 2003 and 2005. It greatly increases the productivity of C# and ASP.NET developers,

More information

Windows File Management A Hands-on Class Presented by Edith Einhorn

Windows File Management A Hands-on Class Presented by Edith Einhorn Windows File Management A Hands-on Class Presented by Edith Einhorn Author s Notes: 1. The information in this document is written for the Windows XP operating system. However, even though some of the

More information

ThinPoint Quick Start Guide

ThinPoint Quick Start Guide ThinPoint Quick Start Guide 2 ThinPoint Quick Start Guide Table of Contents Part 1 Introduction 3 Part 2 ThinPoint Windows Host Installation 3 1 Compatibility... list 3 2 Pre-requisites... 3 3 Installation...

More information

Installation Instructions Release Version 15.0 January 30 th, 2011

Installation Instructions Release Version 15.0 January 30 th, 2011 Release Version 15.0 January 30 th, 2011 ARGUS Software: ARGUS Valuation - DCF The contents of this document are considered proprietary by ARGUS Software, the information enclosed and any portion thereof

More information

System Requirements for Microsoft Dynamics NAV 2015

System Requirements for Microsoft Dynamics NAV 2015 System Requirements for Microsoft Dynamics September 2014 Contents... 3 Microsoft Dynamics NAV Windows Client Requirements... 4 Microsoft Dynamics NAV Development Environment Requirements... 5 Microsoft

More information

White Paper. Anywhere, Any Device File Access with IT in Control. Enterprise File Serving 2.0

White Paper. Anywhere, Any Device File Access with IT in Control. Enterprise File Serving 2.0 White Paper Enterprise File Serving 2.0 Anywhere, Any Device File Access with IT in Control Like it or not, cloud- based file sharing services have opened up a new world of mobile file access and collaborative

More information

Vector HelpDesk - Administrator s Guide

Vector HelpDesk - Administrator s Guide Vector HelpDesk - Administrator s Guide Vector HelpDesk - Administrator s Guide Configuring and Maintaining Vector HelpDesk version 5.6 Vector HelpDesk - Administrator s Guide Copyright Vector Networks

More information

AdminStudio 2013. Release Notes. 16 July 2013. Introduction... 3. New Features... 6

AdminStudio 2013. Release Notes. 16 July 2013. Introduction... 3. New Features... 6 AdminStudio 2013 Release Notes 16 July 2013 Introduction... 3 New Features... 6 Microsoft App-V 5.0 Support... 6 Support for Conversion to App-V 5.0 Virtual Packages... 7 Automated Application Converter

More information

GoAnywhere Director to GoAnywhere MFT Upgrade Guide. Version: 5.0.1 Publication Date: 07/09/2015

GoAnywhere Director to GoAnywhere MFT Upgrade Guide. Version: 5.0.1 Publication Date: 07/09/2015 GoAnywhere Director to GoAnywhere MFT Upgrade Guide Version: 5.0.1 Publication Date: 07/09/2015 Copyright 2015 Linoma Software. All rights reserved. Information in this document is subject to change without

More information

Hyperoo 2 User Guide. Hyperoo 2 User Guide

Hyperoo 2 User Guide. Hyperoo 2 User Guide 1 Hyperoo 2 User Guide 1 2 Contents How Hyperoo Works... 3 Installing Hyperoo... 3 Hyperoo 2 Management Console... 4 The Hyperoo 2 Server... 5 Creating a Backup Array... 5 Array Security... 7 Previous

More information

Continuous Integration

Continuous Integration Continuous Integration WITH FITNESSE AND SELENIUM By Brian Kitchener [email protected] Intro Who am I? Overview Continuous Integration The Tools Selenium Overview Fitnesse Overview Data Dependence My

More information

UNICORN 6.4. Administration and Technical Manual

UNICORN 6.4. Administration and Technical Manual UNICORN 6.4 Administration and Technical Manual Page intentionally left blank Table of Contents Table of Contents 1 Introduction... 1.1 Administrator functions overview... 1.2 Network terms and concepts...

More information