HOW AND WHY TO CREATE EMPTY OBJECT IN QTP?

Answers were Sorted based on User's Feedback



HOW AND WHY TO CREATE EMPTY OBJECT IN QTP?..

Answer / sudhsrk

After an object is used the object has to be made empty so
that the memory used by that object is released and it can
be instantiated and used again. So we create an empty
object

Dim obj
Set obj = CreateObject("InternetExplorer.Application")

obj=Nothing

Is This Answer Correct ?    3 Yes 1 No

HOW AND WHY TO CREATE EMPTY OBJECT IN QTP?..

Answer / sudhsrk

After an object is used the object has to be made empty so
that the memory used by that object is released and it can
be instantiated and used again. So we create an empty
object

Dim obj
Set obj = CreateObject("InternetExplorer.Application")

obj=Nothing

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More QTP Interview Questions

How to create configuration scripts

1 Answers  


how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?

0 Answers  


Hi, I am trying to automate the web application for generating Reports.I am facing issue with IE while running the script. After 4 report IE crashes.I am using QTP 9.5 with IE version 7. Can anubody give me solution for this issue. Thanks in advance-Jyotsna

0 Answers  


what is file database

1 Answers   Wipro,


there is 3 flash player buttons does QTP identify them or not else we have to do install anything related that software if we have to install what is that software and how we install it into QTP8.2 GIVE ME EXCAT ANSWER IF U KNOW.

1 Answers  






Can you tell me QTP is support for GIS(Geography Information System) Based Software.

1 Answers  


How to count the no of objects in XML file(QTP)

1 Answers   IBM,


I want to install qtp software in my system, My operating system is vista . Anybody please suggest me how to get QTP software with licence key

2 Answers  


What test cases can you automate using QTP?

0 Answers  


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

0 Answers  


What is the Risk Analysis? Waht types of risk analysis are there?

1 Answers  


Tell me about qtp?

0 Answers  


Categories