Wednesday, October 21, 2009

Enter Data in Dynamic Field in a web page

In Below function maitain Property values in Fields sheet and pass data from global sheet.

Public function Filldata(MyPage,ObjClass)
set objdesc=Description.Create
objdesc("micclass").value=ObjClass
set obj= MyPage.ChildObjects(objdesc)
objcount=obj.count
msgbox objcount
For i=0 to objcount-1
msgbox obj(i).getroproperty("name")
strObjProperty=obj(i).getroproperty("name")
intFieldsRowCounter = DataTable.GetSheet("Fields").GetRowCount
For j = 1 to intFieldsRowCounter
datatable.getsheet("Fields").setcurrentrow(j)
If Instr(strObjProperty,DataTable.Value("PropertyVal", "Fields")) > 0 Then
'MsgBox "I am in For"
On error resume next
fieldName = DataTable.Value("Field", "Fields")
msgbox datatable.Value( fieldName,"Global")
obj(i).set DataTable.Value(fieldName, "Global")
On error goto 0
Exit for
End If
Next
Next
end function

Guide Lines for clean Uninstall and Reinstall of QTP

Performing a clean uninstall/reinstall of QuickTest Professional From here on, QuickTest will be used to represent QuickTest Professional.

Note: Previous versions of QuickTest should be uninstalled before (re)installing QuickTest.

Here are the steps for a clean uninstall/reinstall of QuickTest :
1. Backup the lservrc file. This file contains licensing information. If you do not save it, you will need to reenter the license code.
For additional information on the lservrc file, including its location, refer to Document ID KM175077 - What is the lservrc file

Note:- If you are using a concurrent license, it should be located on the license server machine. However, if you find the file on your client machine, it is recommended that you back it up.

2. Backup your test scripts.
3. For QuickTest 8.2 or higher, uninstall any non-core add-ins (Control Panel -> Add Remove Programs).

Note:
Add-in versions 6.5 and below did not have a separate uninstall process.

4. Uninstall QuickTest (Control Panel -> Add Remove Programs).
5. Go to the install directory of QuickTest. The default directory is "C:/Program Files/Mercury Interactive/QuickTest Professional/" or "C:/Program Files/HP/QuickTest Professional/" .
6. Delete all the directories under this directory except for the "Tests" folder since it might contain test scripts. If you backed up the test scripts to a different directory in step 2, you can delete the Tests folder also.
7. Open the registry editor (Start -> Run -> regedit).
8. Navigate to the following registry key:

For QuickTest Professional 6.0 and above:
HKEY_CURRENT_USER/Software/Mercury Interactive/QuickTest Professional

For QuickTest Professional 6.0:
HKEY_CURRENT_USER/Software/Mercury Interactive/QuickTest Professional

9. Delete the "QuickTest Professional" or "QuickTest Professional" folder (including all the keys and values under it.) 10. Navigate to the following registry key:

For QuickTest Professional 6.0 and above:
HKEY_LOCAL_MACHINE/SOFTWARE/Mercury Interactive/QuickTest Professional

For QuickTest Professional 6.0:
HKEY_LOCAL_MACHINE/Software/Mercury Interactive/QuickTest Professional

11. Delete the "QuickTest Professional" folder (including all the keys and values under it.) 12. The HKEY_LOCAL_MACHINE/SOFTWARE/Mercury Interactive/QuickTestPro key contains license information. If you want to delete this key as well, Mercury Support recommends backing up the key first (right-click on the "QuickTestPro" key and select Export).
13. Download the MSI uninstaller from the Microsoft: http://support.microsoft.com/kb/290301
14. Run the utility to remove any QuickTest entries that are listed.
15. Delete or Rename the BHOManager.dll in C:/Windows/system32/ folder 16. Delete the following assemblies from the C:/Windows/assembly/ directory:
- Mercury.QTP.Agent
- Mercury.QTP.CustomServer
- Mercury.QTP.WpfAgeny
- policy.6.5.Mercury.QTP.CustomServer
- policy.8.0.Mercury.QTP.Agent
- policy.8.0.MngUtils

17. If the Firefox browser is installed go to Tools->Add-ons and manually remove the QuickTest Professional PlugIn 18. Reboot the machine.
19. Install or reinstall QuickTest Professional.
20. Copy the lservrc file from step 1 into the correct directory. As long as the locking code (which is machine specific) did not change, you should be able to use QuickTest Professionalional without having to re-enter the license code.

Useful information (Phone Numbers)

Thought this might be of some use for us, so sending it across.


Toll Free Numbers in India Airlines Indian Airlines - 1800 180 1407Jet Airways - 1800 22 5522 SpiceJet - 1800 180 3333 Air India -- 1800 22 7722 KingFisher - 1800 180 0101 Banks ABN AMRO - 1800 11 2224Canara Bank - 1800 44 6000 Citibank - 1800 44 2265Corporatin Bank - 1800 443 555Development Credit Bank - 1800 22 5769 HDFC Bank - 1800 227 227ICICI Bank - 1800 333 499 ICICI Bank NRI - 1800 22 4848IDBI Bank - 1800 11 6999Indian Bank - 1800 425 1400ING Vysya - 1800 44 9900Kotak Mahindra Bank - 1800 22 6022Lord Krishna Bank - 1800 11 2300 Punjab National Bank - 1800 122 222 State Bank of India - 1800 44 1955Syndicate Bank - 1800 44 6655 AutomobilesMahindra Scorpio - 1800 22 6006 Maruti - 1800 111 515Tata Motors - 1800 22 5552Windshield Experts - 1800 11 3636 Computers/ITAdrenalin - 1800 444 445 AMD - 1800 425 6664Apple Computers - 1800 444 683 Canon - 1800 333 366Cisco Systems - 1800 221 777Compaq - HP - 1800 444 999Data One Broadband - 1800 424 1800Dell - 1800 444 026Epson - 1800 44 0011 eSys - 3970 0011Genesis Tally Academy - 1800 444 888 HCL - 1800 180 8080IBM - 1800 443 333Lexmark - 1800 22 4477Marshal's Point - 1800 33 4488Microsoft - 1800 111 100 Microsoft Virus Update - 1901 333 334 Seagate - 1800 180 1104Symantec - 1800 44 5533 TVS Electronics - 1800 444 566WeP Peripherals - 1800 44 6446 Wipro - 1800 333 312xerox - 1800 180 1225Zenith - 1800 222 004 Indian Railway General Enquiry 131Indian Railway Central Enquiry 131 Indian Railway Reservation 131Indian Railway Railway Reservation Enquiry 1345,1335,1330 Indian Railway Centralised Railway Enquiry 1330/1/2/3/4/5/6/7/8/9
Couriers/Packers & MoversABT Courier - 1800 44 8585AFL Wizz - 1800 22 9696 Agarwal Packers & Movers - 1800 11 4321 Associated Packers P Ltd - 1800 21 4560DHL - 1800 111 345FedEx - 1800 22 6161Goel Packers & Movers - 1800 11 3456UPS - 1800 22 7171 Home AppliancesAiwa/Sony - 1800 11 1188 Anchor Switches - 1800 22 7979Blue Star - 1800 22 2200Bose Audio - 1800 11 2673Bru Coffee Vending Machines - 1800 44 7171Daikin Air Conditioners - 1800 444 222 DishTV - 1800 12 3474Faber Chimneys - 1800 21 4595 Godrej - 1800 22 5511Grundfos Pumps - 1800 33 4555LG - 1901 180 9999Philips - 1800 22 4422 Samsung - 1800 113 444Sanyo - 1800 11 0101Voltas - 1800 33 4546 WorldSpace Satellite Radio - 1800 44 5432 Investments/ Finance CAMS - 1800 44 2267Chola Mutual Fund - 1800 22 2300Easy IPO's - 3030 5757Fidelity Investments - 1800 180 8000Franklin Templeton Fund - 1800 425 4255 J M Morgan Stanley - 1800 22 0004 Kotak Mutual Fund - 1800 222 626 LIC Housing Finance - 1800 44 0005SBI Mutual Fund - 1800 22 3040Sharekhan - 1800 22 7500Tata Mutual Fund - 1800 22 0101 TravelClub Mahindra Holidays - 1800 33 4539Cox & Kings - 1800 22 1235God TV Tours - 1800 442 777Kerala Tourism - 1800 444 747 Kumarakom Lake Resort - 1800 44 5030Raj Travels & Tours - 1800 22 9900 Sita Tours - 1800 111 911SOTC Tours - 1800 22 3344
HealthcareBest on Health - 1800 11 8899Dr Batras - 1800 11 6767 GlaxoSmithKline - 1800 22 8797Johnson & Johnson - 1800 22 8111 Kaya Skin Clinic - 1800 22 5292LifeCell - 1800 44 5323 Manmar Technologies - 1800 33 4420Pfizer - 1800 442 442Roche Accu-Chek - 1800 11 45 46 Rudraksha - 1800 21 4708Varilux Lenses - 1800 44 8383 VLCC - 1800 33 1262 InsuranceAMP Sanmar - 1800 44 2200Aviva - 1800 33 2244Bajaj Allianz - 1800 22 5858 Chola MS General Insurance - 1800 44 5544HDFC Standard Life - 1800 227 227 LIC - 1800 33 4433Max New York Life - 1800 33 5577Royal Sundaram - 1800 33 8899SBI Life Insurance - 1800 22 9090 Hotel ReservationsGRT Grand - 1800 44 5500 InterContinental Hotels Group - 1800 111 000 Marriott - 1800 22 0044Sarovar Park Plaza - 1800 111 222Taj Holidays - 1800 111 825 TeleshoppinAsian Sky Shop - 1800 22 1800Jaipan Teleshoppe - 1800 11 5225Tele Brands - 1800 11 8000 VMI Teleshopping - 1800 447 777WWS Teleshopping - 1800 220 777 Others Domino's Pizza - 1800 111 123 Cell PhonesBenQ - 1800 22 08 08 Bird CellPhones - 1800 11 7700Motorola MotoAssist - 1800 11 1211Nokia - 3030 3838Sony Ericsson - 3901 1111

http://www.onlineradio4u.com/telugu-radio/radio-vizag-telugu-fm-online/

Find the latest File name in a Folder

We can find the lastest file name(Based on file creation date) in specified folder with below code.
In some applications at runtime files are creating and storing in share point, but we do not have control on file name and have only read only access. In these scenarios below code is helpful for latest file name capture.
Code:-
sPath=" C:\"
GetNewestFile sPath

' getting file name

Function GetNewestFile (byval sPath)
sNewestFile = Null ' init value
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder =objFSO.GetFolder(sPath)
Set oFiles = oFolder.Files
For Each oFile In oFiles
On Error Resume Next
If IsNull(sNewestFile) Then
sNewestFile = oFile.Path
Datatable.Value("FilePath","Global") =sNewestFile
msgbox sNewestFile
dPrevDate = oFile.DateLastModified
msgbox dPrevDate
Elseif dPrevDate < oFile.DateLastModified Then
sNewestFile = oFile.Path
msgbox sNewestFile
Datatable.Value("FilePath","Action1") =sNewestFile
End If
On Error Goto 0
Next
If IsNull(sNewestFile) Then
sNewestFile = ""
GetNewestFile = sNewestFile
msgbox GetNewestFile
End If
End Function