Posts

Selenium WebDriver : - How to capture screenshot

Selenium WebDriver : - How to capture screenshot Java code to capture browser screen shot is as follows – File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType. FILE ); //take picture of browser                         screenshotpath = "C:\\” + "file1.png" ; //path & file name of picture                                                 try {                  FileUtils. copyFile (scrFile, new File ( screenshotpath )); //.png file is copied from memory     to file system         ...

QTP vs. Selenium

This article demonstrates bird eye comparison between HP QuickTest Professional and Selenium. These are popular test automation tool, specially, for functional & regression testing. Purpose of this comparison is not to say which is better tool, it consists of comparison of tool based on different criteria like supported O/S, browser, object spy, object repository, license cost etc. This article is targeted for readers having prior working knowledge of automation approach & at-least one automation tool. Quick overview of tools is as follows – Introduction HP QuickTest Professional is a graphical user tool & provides solution for functional test and regression test automation. This next-generation automated testing solution deploys the concept of keyword-driven testing to enhance test creation and maintenance. QuickTest Professional meets the needs of both technical and non-technical users. It works hand-in-hand with HP Business ...

QTP Best Practices

HP Quick Test Professional is a test automation tool, also known as QTP. It is used to automate functional, regression & smoke test cases. It is a very popular tool and works on MS windows O/S, supports development technologies like Active X, Delphi, Java, .Net, Oracle, People Soft, web, Web services etc. This article discusses about best practices while doing automation using QTP.     Don’t use msgbox function, this function pauses the script execution & requires user intervention. This defeats the objective of unattended script execution. To store or display error message and execution log use QTP inbuilt Reporter object.        Follow coding guidelines like comments, variable & function name declaration.        Use option explicit to enforce variable declaration. Always define variables at the top of script & function file        Neither hard code test data nor read value using...

How to Perform right Click Using QTP

'The below code can be used to perform mouse right click whereever required  Browser(”Browser”).Page(”Page”).WebTable(”table”).FireEvent “onclick”,,,micRightBtn   ‘Right clicking on th e object

Common Unix - Shell Features

Overview of common shell features.  The following features are standard in every shell. List is as follows - Command     Meaning >     Redirect output >>     Append to file <     Redirect input <<     "Here" document (redirect input) | Pipe     output &     Run process in background. ;     Separate commands on same line *     Match any character(s) in filename ?     Match single character in filename [ ]     Match any characters enclosed ( )     Execute in subshell ` `     Substitute output of enclosed command " "     Partial quote (allows variable and command expansion) ' '     Full quote (no expansion) \     Quote fol...

Writing Recursive Functions

How to Write Recursive Functions A recursive procedure is one that calls itself. Example is as follows – The following procedure uses recursion to calculate the factorial of its original argument. Function factorial(ByVal n As Integer) As Integer If n <= 1 Then Return 1 Else Return factorial(n – 1) * n End If End Function

UNIX Commands in Nutshell

UNIX Command Summary There are MANY commands available for you in a UNIX shell account. A list of them follows (in no particular order). Remember, you can always read the manpage on each command for more information. ls …………….. show directory, in alphabetical order logout …………. logs off system mkdir ………….. make a directory rmdir ………….. remove directory (rm -r to delete folders with files) rm …………….. remove files cd …………….. change current directory man (command) …… shows help on a specific command talk (user) …….. pages user for chat – (user) is a email address write (user) ……. write a user on the local system (control-c to end) pico (filename) …. easy to use text editor to edit files pine …………… easy to use mailer more (file) …….. views a file, pausing every screenful sz …………….. send a file (to you) using zmodem rz …………….. recieve a file (to the unix system) using zmodem telnet (host) …… connect to another Internet site ftp (host) ……… connects to a FTP site...