How to create a run time propertyfor an object?

Answers were Sorted based on User's Feedback



How to create a run time propertyfor an object?..

Answer / firoz basha shaik

for ex, suppose that we want to know what is the data in
the text box while the application is running?

FName = Browser("Browser").Page("Page").Webedit
("FirstName").GetROProperty("text")
msgbox FName

the runtime text which is present in FirstName field will
be stored in FName variable and can be seen using msgbox.

Is This Answer Correct ?    5 Yes 1 No

How to create a run time propertyfor an object?..

Answer / kiran1783

'The following example uses the SetTOProperty method to set
the

'html id of the WebFile object.



Browser("Fill-Out-Form").Page("Fill-Out-Form").WebFile
("name-of-files").SetTOProperty "html id", 4

Is This Answer Correct ?    3 Yes 2 No

How to create a run time propertyfor an object?..

Answer / ravi

Sorry kiran...
we can not set a property to an object in run time .
You can use GetROProperty(”outerText”) to get the outerText
of a object but there is no function like SetROProperty
tochange this property. But you can use
WebElement().object.outerText=”Something” to change the
property.

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More QTP Interview Questions

How to load an object to a object repository at RUN TIME ?

3 Answers  


how to capture tool tip in QTP and which check point is needed

2 Answers   Syntel,


What is the differnce between action & script

1 Answers  


How to handle the exceptions using recovery secnario manager in Qtp?

2 Answers  


What is the main difference between desriptive programming and generic functions

2 Answers   HCL,






To count the no of links present in the yahoo home page i have written the script like this Set fileSysObject=createobject("Scripting.FileSystemObject") Set linksFileName=fileSysObject.opentextfile ("D:\samplelinkfile.txt",2,true) Set linkDescObj=description.Create linkDescObj("micclass").value="Link" Set noOfLinks=browser("yahoo").Page("Yahoo! India").ChildObjects(linkDescObj) For i=0 to noOfLinks.count-1 linkName=noOfLinks(i).getROProperty("name") linksFileName.writeline(linkName) Next linksFileName.close Set fileSysObject=nothing While running the script it showing error that object "yahoo"isnot found in the object repository. Is there any setting before running the script? if yes what is the steps for it.Im using QTP9.0

2 Answers  


What is ObjectParamater?

0 Answers   CTS,


How to do the Mouse Operations in QTP. How to aacess an Image in a web application to save it on my desktop. To my Knwoledge that can be done by mouse right click on the Image and selecting 'Save the Image'option. Or Is there any alternate way to do this..

1 Answers  


Hi we are running tests remotely from quality center and pushing tests into qtp boxes remotely, and it does execution but while uploading results back into quality center it hangs in qtp box.If any one come across similar problem, please send me details how to handle this. Thanks kris

0 Answers  


What is error handled other than recovery scenario manager?

2 Answers  


If aclient comes to tester ask to bye a tool Keep aside about the cost,In what way we can choose the tool.

1 Answers  


What is accessibility check point?

0 Answers  


Categories