Friday, 9 August 2013

How to Select Date & Year Using Regular Expression in QTP

[0-1])|(2\d)|(1\d)|(0?[1-9]))\-[A-Za-z]{3}\-(1[0-9]|20)[0-9]{2}

Description of The Keyword-Driven or Table-Driven Framework

The Keyword-Driven or Table-Driven framework requires the development of data tables and keywords, independent of the test automation tool used to execute them . Tests can be designed with or without the Application. In a keyword-driven test, the functionality of the application-under-test is documented in a table as well as in step-by-step instructions for each test.
There are 3 basis components of a Keyword Driven Framework viz. Keyword , Application Map , Component Function.
Keyword – Keyword is an Action that can be performed on a GUI Component. Ex . For GUI Component Textbox some Keywords ( Action) would be InputText, VerifyValue,
VerifyProperty and so on.
Application Map – An Application Map Provides Named References for GUI Components. Application Maps are nothing but “Object Repositry’
Component Function – Component Functions are those functions that actively manipulate or interrogate GUI component. An example of a function would be click on web
button with all error handling , enter data in a Web Edit with all error handling. Component functions could be application dependent or independent.
Advantages
– Provides high code re-usability
– Test Tool Independent
– Independent of Application Under Test, same script works for AUT (with some limitations)
– Tests can be designed with or without AUT
Disadvantages
– Initial investment being pretty high, the benefits of this can only be
– realized if the application is considerably big and the test scripts are to be maintained for quite a few years.
– High Automation expertise is required to create the Keyword Driven Framework.

Drupal — An Overview & Its Use

Drupal is an Open-Source Content Management System. If you are new to both computing and Drupal, then this probably doesn’t clear things up very much. A content management system is software that facilitates the creation, organization, manipulation, and removal of information in the form of images, documents, scripts, plain text.
Benefits of Drupal
• Reliable and robust: Are there a lot of bugs in the code? Will it affect my site if I have to
forever add patches or obtain updates for faulty code?
• Efficient: Does the code use my server’s resources wisely? Am I likely to run into
concurrency problems, or speed issues early on?
• Flexible: If I change my mind about what I want from my site, will I be able to implement
those changes without redoing everything from scratch?

Uses of Drupal
The following list shows the most common uses at present and comes from the case on the Drupal site:
Community Portal Sites: If you want a news website where the stories are provided by the audience, Drupal suits your needs well. Incoming stories are automatically voted upon by the audience and the best stories bubble up to the homepage. Bad stories and comments are automatically hidden after enough negative votes.

News Publishing: Drupal is great for newspapers and other news organizations.
Aficionado Sites: Drupal flourishes when it powers a portal website where one person shares their expertise and enthusiasm for a topic.

Intranet/Corporate Web Sites: Companies maintain their internal and external web sites in Drupal. Drupal works well for these uses because of its flexible permissions system, and its easy web-based publishing.
Resource Directories: If you want a central directory for a given topic, Drupal suits your needs well. Users can register and suggest new resources, while editors can screen their submissions.
International Sites: Thanks to the localization features within Drupal, there are many Drupal sites implemented in a wide range of languages.
Education: Drupal can be used for creating dynamic learning communities to supplement the face-to-face classroom or as a platform for distance education classes. Academic professional organizations benefit from its interactive features, and the ability to provide public content, member-only resources, and member subscription management.
Art, Music, Multimedia: Drupal is a great match. No other platform provides the rock solid foundation that is needed to make multimedia-rich websites that allow users to share, distribute, and discuss their work with others.
Social networking sites: Drupal used extensively in social networking sites. You can build a collection of social networking applications for your site or use Drupal as a white label social networking service.

PHP - Variables and Data Types

A variable is a keyword or phrase that acts as an identifier for a value stored in a system’s memory. This is useful because it allows us to write programs that will perform a set of actions on a variable value, which means you can change the output of the program simply by changing the variable, rather than changing the program itself.
Storing Values in a Variable
PHP lets you store nearly anything in a variable using one of the following data types:
String : Alphanumeric characters, such as sentences or names
Integer: A numeric value, expressed in whole numbers
Float: A numeric value, expressed in real numbers (decimals)
Boolean: Evaluates to TRUE or FALSE (sometimes evaluates to 1 for TRUE and 0 for FALSE)
Array: An indexed collection of data
Object: A collection of data and methods

How to Right Click on Web Link and Select [Save Target As]..

Solution is as follows -
Browser(”name:=Google”).Page(”title:=Google”).Link(”name:=iGoogle”)
Window(”hwnd:=”&Browser(”name:=Google”).GetROProperty(”hwnd”)).Type micDwn
+ “A” + micReturn
Function RightClick(Obj)
X = Obj.GetROProperty(”abs_x”) + Obj.GetROProperty(”width”)/2
Y = Obj.GetROProperty(”abs_y”) + Obj.GetROProperty(”height”)/2
Set deviceReplay = CreateObject( “Mercury.DeviceReplay” )
deviceReplay.MouseClick X,Y,”2″
Set deviceReplay = nothing
End Function