Click on .net toolbar using bounds property

In continuation to the previous post Automation of the .NET ToolbarsManager , here is the code that will click on any toolbars button using the bounds property :

Note that:
  1. The toolbar is recognized as an swfobject here
  2. We are accessing the CommandLinks collection to access individual buttons in the toolbar
  3. Using an array to get the bounds and then clicking on the respective button.

Set Mnubar = SwfWindow("").SwfObject("").Object.CommandLinks

For i = 0 To Mnubar.Count -1
    msgbox Mnuname
    oBounds = Mnubar.Item(i).Bounds
    arrBounds = Split(oBounds, ",")
    arrBound = Split(arrBounds(0), "=")
    iX = CInt(arrBound(1))
    arrBound = Split(arrBounds(1), "=")
    iY = CInt(arrBound(1))
    SwfWindow("").SwfObject("").Click iX,iY   

We can make this code more generic by passing the name of the button or the tooltip of the button which has to be clicked.

Hope this helps... Happy Automating!

Create Reports Using TestNG - Testing

Creating Report.....It is easy with will create default HTML format.

The Default feature in TestNG is it will create reports need not to write any code...

Just run the Script with will automatically create a report...

First Setup the TestNg
Please go through the following link if you dont know how to set up...

Setting up Selenium RC & TestNG using Eclipse

Observe the screen shot before running the test...

Before Running the Test

Run the script --Run as -->TestNG --see the below screen shot...Report is generated.

Screen Shot after running the Test

After Running the Test

NOTE: You need to download the testng-5.14.10.jar should be in your referenced library..

Hope it will be helpful .......

Source: NagaRaju Dasam


If not QTP then what?

I have seen a lot of traction towards the blog post "QTP v/s Selenium" . Like I have always said in my earlier posts that QTP has been one of my favorite tools and also one of the most explored tools.Tools like Quicktest are great but there are definitely some drawbacks with knowing just QTP and nothing else.
I believe going forward just knowing tools like QTP would not help... We would need tools that :
  1. Can fit into a fast paced agile project 
  2. Are low on cost 
  3. Are low on maintainance.
  4. Are not just GUI based and at-least get to a level below the presentation layer.
  5. Allow choice of scripting languages
  6. Allow Continuous Integration
Open-source has contributed a great deal to such kinda tools ... so here is a quick list of tools that answer if not QTP then what? in no specific order:
  • Selenium / Tellurium
  • Watir / WatiN
  • Sahi 
  • FitNesse
  • Canoo
  • Cucumber
  • Rspec
  • AutoIt / iMacros
  • White for .Net
  • Marathon/JWebUnit for Java
  • Frankenstein for Swing apps
There are many more tools but these are some of them that seem to be popular with the masses and have a good support.


Run Commands Cheat sheet

Run command is one of the most used commands when it comes to testing windows based applications.
Here are a set of commands that can be used as a quick reference while automating windows apps:

Application Data Folder%appdata%
Home Directory Drive%homedrive%
Home Directory%homepath%
Shared Home Directory%homeshare%
Temporary Folder%temp%
Windows Root Drive%systemdrive%
Windows Root Directory%windir%

Computer Managementcompmgmt.msc
Device Managerdevmgmt.msc
Disk Cleanup Utilitycleanmgr
Disk Defragmentdfrg.msc
Disk Managementdiskmgmt.msc
Disk Partition Managerdiskpart
Dr. Watson System Troubleshootingdrwtsn32
Driver Verifier Utilityverifier
Event Viewereventvwr.msc
Group Policy Editor (XP Prof)gpedit.msc
Local Security Settingssecpol.msc
Local Users and Groupslusrmgr.msc
Performance Monitorperfmon
Resultant Set of Policyrsop.msc
Scheduled Taskscontrol schedtasks
Shared Foldersfsmgmt.msc
System Configuration Editorsysedit
System Configuration Utilitymsconfig
Utility Managerutilman
Windows System Security Toolsyskey
Run Calculatorcalc
Run Command Promptcmd
Run Firefox (if installed)firefox
Run Internet Exploreriexplore
Run Microsoft Word (if installed)winword
Run Microsoft Excel (if installed)excel
Run Microsoft Outlook (if installed)outlook
Run Notepadnotepad
Run Wordpadwordpad
Open Control Panelcontrol panel
Open Program Files folder%programfiles%
Shutdown Windowsshutdown
Restart Windowsshutdown -r
Log Off Windowslogoff
Registry Editorregedit
Task Managertaskmgr
Windows Update Launcheswupdmgr

Character Mapcharmap
Check Disk Utilitychkdsk
Clipboard Viewerclipbrd
Free Cellfreecell
Hearts Cardmshearts
Microsoft Chatwinchat
On Screen Keyboardosk
Remote Desktopmstsc
Spider Solitarespider
Telnet Clienttelnet
Windows Magnifiermagnify  

Accessibility Controlsaccess.cpl
Add Hardware Wizardhdwwiz.cpl
Add/Remove Programsappwiz.cpl
Administrative Toolscontrol admintools
Automatic Updateswuaucpl.cpl
Date and Timetimedate.cpl
Display Propertiesdesk.cpl
Folders Propertiescontrol folders
Fontscontrol fonts
Fonts Folderfonts
Game Controllersjoy.cpl
Internet Propertiesinetcpl.cpl
Keyboard Propertiescontrol keyboard
Mouse Propertiescontrol mouse
Network Connectionscontrol netconnections
Network Setup Wizardnetsetup.cpl
ODBC Data Source Administratorodbccp32.cpl
Password Propertiespassword.cpl
Phone and Modem Optionstelephon.cpl
Power Configurationpowercfg.cpl
Printers and Faxescontrol printers
Printers Folderprinters
Regional Settingsintl.cpl
Scanners and Camerassticpl.cpl
Security Centerwscui.cpl
Sounds and Audiommsys.cpl
User Account Managementnusrmgr.cpl
Windows Firewallfirewall.cpl      

Testing News - Mar 10th 2011

  • QualiSystems Strengthens APAC Presence With New Singapore Headquarters - QualiSystems, a leading provider of test automation solutions for network systems, telecom services and electronic equipment, today announced the opening of a new APAC regional branch in Singapore.Source: News 
  • SOASTA Awarded Patent for Visual User Interface of its CloudTest Platform - SOASTA, the leader in cloud-based performance testing, today announced that the United States Patent and Trademark Office has issued the company patent No. 7,844,036 entitled, "Visual Test Automation Tool for Message-Based Applications, Web Applications and SOA Systems." Source: News 
  • DATE 2011 (Design Automation and Test in Europe ) Conference from 14th -18th Mar 2011 - Source:News
  • Croatian brainboxes deploy calculus-based CAPTCHA - Source: News


Test Automation Career - QTP

I have had a lot of friends and testing aspirants asking me , what is it that i should know in QTP to start a career in automation . I shall have a series of posts that will give you an idea of what are the things you need to learn if you want to test a specific technology : e.g : .Net , Java, WebServices etc...
I shall start with the simplest one and my favorite QTP:
  1. Basics of using QTP- use the tutorial and refernce guide for this
  2. Web App testing ( Use the sample HP app for this)
  3. Windows App testing ( Use the sample HP app for this)
  4. VB scripting (from a quicktest point of view)
  5. Advanced concepts in QTP.
  6. Other Advanced concepts like COM objects, Quick test object model 
  7. Make your own DLL’s, work with WSC, and QTP Reserved Objects and Registry changes
  8. Synchronizing  QTP with external applications. 
Hope this helps all those who wanna learn QTP and get into automation.