Custom Search

Friday, September 30, 2011

Lock your PC automatically after the execution of Scripts.

Use the following Script and run

Set obj = CreateObject("WScript.Shell")


sCmnd = "%windir%\SYSTEM32\rundll32.exe user32.dll,LockWorkStation"

obj.Run sCmnd, 0, False

Wednesday, May 11, 2011

How to avoid System lock while QTP is running

You can avoid the System lock by Following steps
1. copy & Paste below code in notepad
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.SendKeys "{NUMLOCK}"
2. Save as keypress.vbs file
3. Schedule in microsoft scheduler (Start> Controlpanel> Scheduled Tasks> Add Scheduled Task) map the .vbs file
4. Schedule for every 1or 2 min for Required hours...

OR
You need to ask System Admin to remove the autolock?

OR

Download and Install caffeine software.





QTP - How to write Send keys

Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.SendKeys "{NUMLOCK}"

List of New Features in QTP 11

Here is the complete list of new features that are available in QTP 11


Good Looking and Enhanced Results Viewer
The new improved results viewer provides an executive summary page with summary data, pie charts and statistics for both the current and previous runs and a quick link to the previous run results.

Easy Regular Expressions
You can now create reg ex with the help of syntax hints. Regular Expression Evaluator is available to test regular expressions that you have created. Good One.

Load Function Libraries at Run Time
With the help of LoadFunctionLibrary statement. You can now load a function library when a step runs instead of at the beginning of a run session.


QTP 11 is Supporting  For FireFox.

Much Awaited Log Tracking is available now
QTP 11 is capable of receiving Java or .NET log framework messages from your application which can then be embedded in the run results.

test data management with Quality CenterImproved test data management when integrated with Quality Center


Web 2.0 Toolkit Applications Support
QTP 11 now supports Web 2.0 Toolkit Applications out-of-the-box similar to any other add-ins.

Silverlight Add-in
To test objects in Silverlight 2 and Silverlight 3 applications. [After installation, Silverlight Add-in is displayed in the Add-in Manager as a child add-in under the WPF Add-in]

Avoid Downtime Due to License Server Failures
Useful for concurrent license users. With redundant license servers you can create failover, so that if your main license server fails, your remaining servers maintain availability of your licenses without causing any downtime or loss of licenses for users.(More Info)

























Tuesday, May 10, 2011

QTP - How to get font size/color background color and other attributes of WebElement

Dim ctrlWebEl, objWebEl

Set ctrlWebEl = Browser("Welcome to Gmail").Page("Welcome to Gmail").WebElement("Welcome to Gmail")
Set objWebEl = ctrlWebEl.Object
sColor = objWebEl.currentStyle.color
sBackgrColor = objWebEl.currentStyle.backgroundColor
sFontSize = objWebEl.currentStyle.fontSize
sFontStyle = objWebEl.currentStyle.fontStyle
sFontFamily = objWebEl.currentStyle.fontFamily
sFontWeight = objWebEl.currentStyle.fontWeight



Connectionstrings fro all data bases

Upload attachments to Quality Center Current Run Test from QTP

Function UpLoadAttachmentToQC(FilePath)
   Set ObjCurrentTest = QCUtil.CurrentTest.Attachments
   Set ObjAttch = ObjCurrentTest.AddItem(Null)
   ObjAttch.FileName = FilePath
   ObjAttch.Type = 1
   ObjAttch.Post
   ObjAttch.Refresh
End Function

FilePath=”C:\abc.vbs”

Call UpLoadAttachmentToQC(FilePath)