GeekInterview.com
Series: Subject:
Question: 179 of 737

QTP Questions

1)How to change a custom object to standard object in QTP ?
2)How to create a excel sheet & insert a value in it by using script?
3)What is the difference between call to existing action & call to copy action?
4)what is the use of smart identification?
5)How can we pass the values through step generator?
6)How to navigate a browser & closing the browser after 5 sec through script?
7)What is the difference between Object repository and object spy?when we will go for object spy?
8)How to import a data from external sheet to global sheet through script?
Asked by: Interview Candidate | Asked on: Nov 12th, 2007
Showing Answers 1 - 4 of 4 Answers
and_re

Answered On : Nov 29th, 2007

View all answers by and_re

3) 'call to existing action' means a shortcut to an existing action. With 'call to copy action' you can insert a copy of an existing action.



4) smart identifaction is an internal function of qtp. If qtp is not able to identify exactly an object then qtp tries to identify this object with others attributes. It works sometimes....



7) object spy is a functionality of qtp for identify objects. With the spy function you can see the diffrent attributes and methods of an objects and parents objects. It could be, that you don't see all attributs in the object repository and then object spy is good instrument.



8) check this out:import sheet to the local sheet: DataTable.ImportSheet(FileName, SheetSource, SheetDest) e.g. DataTable.ImportSheet("c:test.xls", 2, 2)read data: sDataValue = DataTable.Value("parameter", dtLocalSheet)set value to the global sheet:DataTable.Value("parameter", dtGlobalSheet) = sDataValue



Thanks & Regards,

and_re

  
Login to rate this answer.
Sycho

Answered On : Dec 17th, 2007

View all answers by Sycho

1)How to change a custom object to standard object in QTP?

[Sycho] 1- You can define Custom Object as Virtual Objects and maps them to Standard Object Classes using Virtual Object Manager that is accessible from Tools Option of QTP.
2- You can map your custom classes to Standard Test Object Classed from Objcet Identifcation Dialog box that is accessible from Tools menue of QuickTest Professional.


2)How to create a excel sheet & insert a value in it by using script?

3)What is the difference between call to existing action & call to copy action?
[Sycho] - In Call To Existing action, only the reference of the action is copied in the calling action. Called Action is read only mode. Whereas Call By Copy copy the original action itself in the calling action. user can edit called action.

4)what is the use of smart identification?

[Sycho] - Smart Identification still enable QTP to identify objects in the application during playback where some of the properties value has been changed. If the Description Properties Set is unable to identify the Object in the application then QTP use Smart Identification technique if it is enabled and has conifgured properly.



5)How can we pass the values through step generator?
[Sycho] - I could not understand your Question. Please explain it.

6)How to navigate a browser & closing the browser after 5 sec through script?

7)What is the difference between Object repository and object spy?when we will go for object spy?

[Sycho] - Object Repositry contains the recorded Objects and their information and Object Spy is ued to check available properties and their values in the actual application.

8)How to import a data from external sheet to global sheet through script?
[Sycho] - DataTable.GlobalSheet.Import("FilePath ")

  
Login to rate this answer.

1)How to change a custom object to standard object in QTP?

---By using Virtual Object wizard we can map those objects which are not recognized by the tool to a standard object so that it will be identified by the tool.

2)How to create a excel sheet & insert a value in it by using script?

---By using "scripting.filesystemobject"

find the example below.

dim obj
dim file
set obj=createobject("scripting.filesystemobject")
set file=obj.createtextfile("C:test.xls",1,true)
file.writeline("hello")
file.close

3)What is the difference between call to existing action & call to copy action?
-----In call to existing action, we cannot do any modifictions as it is read-only file,
where as in call to copy of action we can do modify the file as it becomes local to the script.

4)what is the use of smart identification?
----During recording QTP identifies the objects by their mandatory properties and stores the info in object repository.
During playback, if QTP is unable to identify an object by using mandatory properties, it will use assistive properties.Even this time also,if it wont identify the object that time it use smart identification to uniquely identify an object.
So it use ordinal identifier like MSW class and co-ordinates of the object as it is unique to any object.


5)How can we pass the values through step generator?
I too could not understand your Question. Please explain it.

7)What is the difference between Object repository and object spy?when we will go for object spy?

-----Object Repositry contains the recorded Objects and their information and Object Spy is ued to check available properties and their values in the actual application.

8)How to import a data from external sheet to global sheet through script?
---DataTable.Import("FilePath ")

please correct me if any of the above is not correct.

  
Login to rate this answer.

1)How to change a custom object to standard object in QTP?

---By using Virtual Object wizard we can map those objects which are not recognized by the tool to a standard object so that it will be identified by the tool.

2)How to create a excel sheet & insert a value in it by using script?

---By using "scripting.filesystemobject"

find the example below.

dim obj
dim file
set obj=createobject("scripting.filesystemobject")
set file=obj.createtextfile("C:test.xls",1,true)
file.writeline("hello")
file.close

3)What is the difference between call to existing action & call to copy action?
-----In call to existing action, we cannot do any modifictions as it is read-only file,
where as in call to copy of action we can do modify the file as it becomes local to the script.

4)what is the use of smart identification?
----During recording QTP identifies the objects by their mandatory properties and stores the info in object repository.
During playback, if QTP is unable to identify an object by using mandatory properties, it will use assistive properties.Even this time also,if it wont identify the object that time it use smart identification to uniquely identify an object.
So it use ordinal identifier like MSW class and co-ordinates of the object as it is unique to any object.


5)How can we pass the values through step generator?
I too could not understand your Question. Please explain it.

7)What is the difference between Object repository and object spy?when we will go for object spy?

-----Object Repositry contains the recorded Objects and their information and Object Spy is ued to check available properties and their values in the actual application.

8)How to import a data from external sheet to global sheet through script?
---DataTable.Import("FilePath ")

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.