Tuesday 7 January 2014

HP QTP : What is the difference between functions and actions in QTP




               QTP Action
                 Function
  • Action is a QTP concept and it can use QTP features like own Object Repository, Data Table, checkpoints etc.
  • Actions help make your Test modular and increase reuse. Example: You can divide your script into Actions based on functionality like Login, Logout etc.
  • It is slow in execution.
  • Functions is a VB Script programming concept and do not have their own Object Repository or Data Table. Functions help in re-use of your code. Ex:  You can create a Function in your script to concatenate two strings.
  • We can’t use checkpoints in functions, instead of checkpoints we can use validation points (Loops and Conditional statements)
  • Functions are faster in execution than Actions

Friday 3 January 2014

What is the Difference between Bitmap Check point & Image Check point

Bitmap checkpoint does a pixel to pixel comparison of an image or part of an image.

Image Checkpoint checks the value of an image in your application like alt text, destination URL. Note: You create an image checkpoint by inserting a standard checkpoint on an image object. It is supported only in web environment.

How to create runnable jar file for your Selenium project

   1.   Right click on your project in eclipse
   2.   Select Export
   3.   Select [Java -> Runnable Jar file]
   4.   Provide Export Location
   5.   Click finish

 Run generated .jar file from command prompt


Script will run on machine having Browser & Java.

How to open Selenium IDE in Firefox

Selenium IDE can be opened in two ways
1.       Go to [View -> Side bar -> Selenium IDE]

2.       Go to [Tools -> Selenium IDE]

What are the element locators available with Selenium which could be used to locate elements on web page

There are mainly 5 locators used with Selenium –
1.       html id
2.       html name
3.       XPath locator
4.       Css locators
5.       DOM
6.       LinkText
7.       PartialLinkText
8.       Tagname

9.       Classname