Hi Saket,
This is my recorded script. While running at last if QTP clicks on finish button then getting the error. But manually if i run it application not throwing error. I am also attaching the screen shots for the wizard. In the results page we are not entering any thing just clicking on finish only.
Recorded QTP Script
Code:
SwfWindow("ITKK.NET").SwfTreeView("tvITKKTree").Select "AutoCustomer-3-Feb-2010;test compressor class 2.1;1st Stage", micRightBtn
SwfWindow("ITKK.NET").SwfToolbar("SwfToolbar").Select "Operating Condition Wizard"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtOCName1").Set "Design"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtSuctionPressure1").Set "1.03"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtDischargePressure1").Set "3.90"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtSuctionTemperature1").Set "-90"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfButton("Next").Click
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtGasAnalysisName2").Set "methane"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtGasAnalysisName2").Type micTab
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtHumidity2").Type micTab
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfComboBox("cmbHumidity2").Type micTab
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvGases").SelectCell 93,"Gas Name"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfButton("btnAdd").Click
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvSelectedGases").SelectCell 1,"Proportion"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvSelectedGases").SetCellData 1,"Proportion","90"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvGases").SelectCell 119,"Gas Name"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvSelectedGases").SelectCell 2,"Gas Name"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvSelectedGases").SelectCell 2,"Proportion"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvSelectedGases").SetCellData 2,"Proportion","10"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfButton("Next").Click
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfButton("Finish").Click
Even i modified the script as like below. But no use. Tabhits is just a small function contains for loop.
Code:
Set WshShell = CreateObject("WScript.Shell")
Public Function TabHits(i)
For j = 1 to i
WshShell.SendKeys "{TAB}"
Next
End Function
Code:
SwfWindow("ITKK.NET").Activate
SwfWindow("ITKK.NET").SwfTreeView("tvITKKTree").Select "AutoCustomer-3-Feb-2010;test compressor class 2.1;1st Stage"
SwfWindow("ITKK.NET").SwfTreeView("tvITKKTree").Select "AutoCustomer-3-Feb-2010;test compressor class 2.1;1st Stage", micRightBtn
SwfWindow("ITKK.NET").SwfToolbar("CMSOpen").ShowDropdown "Wizards"
SwfWindow("ITKK.NET").SwfToolbar("CMSOpen").Select "Wizards;Operating Condition Wizard"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtOCName1").Set "Design"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtSuctionPressure1").Set "1.03"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtDischargePressure1").Set "3.90"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtSuctionTemperature1").Set "-90"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfButton("Next").Click
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfEdit("txtGasAnalysisName2").Set "methane"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvGases").SelectCell 0,"Formula"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvGases").SelectCell 93,"Gas Name"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfButton("btnAdd").Click
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvSelectedGases").SelectCell 1,"Proportion"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvSelectedGases").SetCellData 1,"Proportion","90"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvGases").SelectCell 119,"Gas Name"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfButton("btnAdd").Click
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvSelectedGases").SelectCell 2,"Proportion"
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfTable("dgvSelectedGases").SetCellData 2,"Proportion","10"
wait(3)
SwfWindow("ITKK.NET").SwfWindow("Operating Condition").SwfButton("Next").Click
wait(3)
Call TabHits(21)
wait(2)
WshShell.SendKeys "{ENTER}"
Hi Saket i am also attaching the screen shots for the same.