Posts

Solution to warning in Quality Center shows FAIL

Image
I am sure a lot of QTP users who run their tests from quality center must have noticed that a test passes with warning , but when the test set is closed it turns into fail. Solution: The best way is to modify the registry setting or use the below code: WshShell.RegWrite"HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\"&_ "Logger\Media\TD\TreatWarningAs","TREAT_AS_PASS","REG_SZ" If the tests are failing the key (TreatWarningAs)would have "TREAT_AS_FAIL" change this to TREAT_AS_PASS and you would be relieved for sure ;) Hope this helps, Happy Testing!

Website's underlying technology for automation

Image
Like most testers, you probably automate a certain number of websites.. Ever wonder how those websites work? What technologies does that website or blog use? What is the underlying software that the website runs on? These are all good questions before starting automation on a website and not always easily determined by just viewing a website. Sitonomy is a cool web service that you can use to get information about a website, such as what technology is used to run the website, what advertising the site uses, the programming language for the website, what kind of server it is running on, and lots more.     To add to that : http://stackoverflow.com/questions/396739/how-do-you-determine-what-technology-a-website-is-built-on

Solution to "this test is locked by another quality center user"

Image
There are a lot of instances while working with Quality center that you might have noticed this message "this test is locked by another quality center user” Sometimes you may have imposed a self lock on it.. J This happens mostly when the user kills the QTP process when the script is still open(from QC). If you have forgotten the machine where you have imposed a self lock then don’t worry as here is the soln to get rid of the same: Copy the following code and run it from the machine were qc is instantiated. On Error Resume Next     desc = "Please provide the network id for the user, and please make sure" &_         "this user is logged out prior to removing locks"    UName = InputBox(desc,"Provide network id")   If(UName <> "") Then        Set cmd = TDConnection.Command         cmd.CommandText = "DELETE FROM Locks WHERE LK_USER ...

Maximize browser using QTP and IE8 / IE7 / Firefox

Image
Problem : Maximize a tabbed browser (ie7/ie8/firefox) Solution1:  hwnd=Browser("name:=myBrowser").getROProperty("hwnd")                Window("hwnd:="&hwnd").Maximize Disadvantage:  Does not work with tabbed browsers consistently Solution2: hwnd=Browser("name:=myBrowser").Object.HWND               Set objWindow=Window("hwnd:="&hwnd2)               objWindow.Maximize Disadvantage:  Does not work with tabbed browsers when there are multiple browsers open   Solution3: SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe",URL,"C:\","open","3" The "3" at the end Activates and Maximizes the window. Disadvantage:  Does not work when the browser is already open   Solution4: Set WshShell = CreateObject("WScript.Shell") ...

Why do we need to launch the application under test (AUT) after QTP is launched?

Image
Have you ever wondered why do we need to launch the application under test (AUT) after QTP is launched? When I started learning QTP I asked the same question to the trainer and he said he would get back on it, after some research i found the answer to my question , sharing here what i learnt ( few years back ) and found ( recently ) : QTP interacts with test applications using windows hooks. A hook is a point in the system message-handling mechanism where an application can install a subroutine to monitor the message traffic in the system and process certain types of messages before they reach the target window procedure. Therefore these hooks help QTP during recording and identifying objects Hooks can only be installed using DLLs These Hooks can be injected only during runtime when QTP is brought up. An interesting example from Tarun here  : "Hooks are basically interceptors in system". This example will clear it User Clicks -> Windows OS determi...