If u r using descriptive programming to identify the object
where do u write the script for those objects? do u write
it in the expertview? plz do answer its urgent thanks
advance.

Answer Posted / krishan kant sharma

You need to write script in Expert Mode.
For example you want to click on one button available on
Calculator:
' Open Calculator
Systemutil.Run "Calc"
'Click on Button 1-simplest code
Window("text:=Calculator").winbutton("text:=1").Click
'Close Calculator
systemutil.CloseDescendentProcesses

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?

575


An object is non standard object, i mapped it to standard object, eventhogh on mapping to standard object i cannot use the methods available on the standard object with the mapped object. How i can use those standard object methods with these mapped object. (((Note : dont tell that we can use virtual object as virtual object is to map nonstandard obj to standard obj)))

1569


I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.

1569


Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak

1607


i have doubt suppose iam purly working in QTP, when i will work on sql and performence testing? pls any one clarify doubt?

1488






Output values? i want a practical example

1298


Hi All, I have QTP installed on my machine but the application under test is on remote machine. I need to automate the scenarios which consist of automatically enter the remote machine through IP address ,record the application in remote machine and run it also when played. Can some one tell how to record the application in remote machine.

1549


what is command for executing files?

1502


How do you script a nested loop in QTP? I am showing a snipet of my code. Any suggestions to help me get this to work would be great appreciated! STEP A - Customer Number: No loop - ISBN: Loop STEP B - Customer Number: Loop - ISBN: Nested Loop Here is the code I am using now. I am using i for the loop and j for the nested loop in STEP B of my script. =========================================== 'CREATE AN ADDITIONAL CUSTOMER Dim myNum, RowNum, RowCnt2, val2, total, i DataTable.ImportSheet "C:\QOE Data - UAT1.xls" ,"Data" ,"Global" RowCnt2 = DataTable.GetRowCount i = 1 DataTable.SetCurrentRow(i) ' Set row to one Do while Not i > RowCnt2 i=i+1 DataTable.SetNextRow MsgBox Datatable.Value("Customer_Num") Msgbox i Msgbox RowCnt2 If Not i > RowCnt2 then val2=datatable.Value("Customer_Num","Global") OracleFormWindow("Sales Order").SelectMenu "File->New" OracleFormWindow("Sales Order").OracleTabbedRegion("Order Information").OracleTextField("Customer Number").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Order Information").OracleTextField("Customer Number").Enter val2 End If 'CREATE SECOND ISBN LIST DataTable.ImportSheet "C:\QOE Data - UAT1.xls" ,"Data" ,"Global" Dim j, RowCnt3, val3 RowCnt3 = DataTable.GetRowCount For j = 1 To RowCnt3 DataTable.SetCurrentRow(i) ' datatable.getSheet("DataTable").setNextRow If Trim(DataTable("ISBN",dtGlobalSheet)) = "" Then j = j - 1 Exit For End If Next 'Define ISBN rows If RowCnt3 <> j Then RowCnt3 = j End If 'Loop through ISBN rows For j = 1 To RowCnt3 DataTable.SetCurrentRow(i) val3 = Datatable.Value("ISBN","Global") msgbox j If j = 1 Then OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item").Enter val3 else If j < 16 Then OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_"&i).SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_"&i).Enter val3 else If RowCnt1 => 16 Then OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").InvokeSoftkey "DOWN" OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").Enter val3 end if end if End If Next 'EXIT APP msgbox i loop Browser("Browser").Page("Oracle Applications 11i").Sync Browser("Browser").Close ========================================== It isn't working correctly in my nested loop in STEP B (for ISBN). Any ideas?? Thanks! SBsteve

6723


How many types of recording facility are available in quicktest professional (qtp)?

589


Explain qtp(quick test professional)?

561


How can you identify the browser and its information using QTP script?

530


What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?

622


HI, pls help me on this, iam not able to capture getcelldata value in javatable... msgbox javawindow("").javatable("").getcelldata(3,3) but it diaplays empty...

2383


I have two For loop, first For loop does is creates a customer and input the customer info and then the second for loop within the first for loop does the follows which is capture the customer name and verify the with the data within the datatable. The problem I am coming across is that when it goes through the second time creating another customer and then verify the second customer then it creates the following during runtime. I want is to have the customer2 below Customer1 under the Customer_from_Apps. Any help will be greatly appreciate it. Customer Customer_from_Apps Customer_from_Apps1 Customer1 Customer 1 Customer2 Customer2 Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Customer_Val= Datatable.GlobalSheet.AddParameter ("Customer_from_Apps",runtimevalue) row=datatable.getsheet("Global").GetRowCount For x=1 to row datatable.SetCurrentRow(x) Data_Val=Datatable.Value("Customer",dtGlobalSheet) If (trim(Customer_Val)=trim(Data_Val)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val else Reporter.ReportEvent micFail, "Cusotmer validation unsuccessful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val End If Next

1320