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

synchronization, wait,wait Property?

1 Answers  


please tell me how to identify the index of the link in the web table .links are not constant.example i want to click the link in the inbox ,search the item and click the partcular mail.(mail links count is not constant)

1 Answers   IBM,


Lets say,flipkart website...in search button we have entered category[i.e watches] it displays some items...question is how to test price displayed each product is correct or not through qtp

1 Answers   Cap Gemini,


Got job with 3 years fake Experience

1 Answers   MNC,


can we install qtp in windows vista

2 Answers  






Hi I am new to QTP. we are planning to implement automation for the application. I am trying to execute the following script: Set ExcelObj=CreateObject ("Excel.Application") ExcelObj.WorkBooks.Add Set NewSheet=ExcelObj.Sheets.Item(1) NewSheet.Name="Order" ExcelObj.Cells(1, 1).Value = "Name" ExcelObj.Cells(1, 2).Value = "Ordernum" ExcelObj.Cells(2, 1).Value = "nam" ExcelObj.Cells(2, 2).Value = "21" ExcelObj.ActiveWorkbook.SaveAs "c:\test1.xls" ExcelObj.Quit Set ExcelObj = Nothing in the above script for the line(ExcelObj.Cells(2, 2).Value = "21") it is inserting the value 21 successfully.this is fine But if i want to insert a variable instead of the constant value then what should be the modification in the script. For example: If user retrives a value throug "GetRoProperty" and wants to insert the value into then how the script changes?

1 Answers  


How do you configure QTP AND Test director?

0 Answers  


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

1 Answers  


How QA specialist can identify when programmatic descriptions are useful?

0 Answers  


How can you merge two Object Repositories?

3 Answers  


Please can you give where can we get good QTP Training at Hi-Tech city Hyderabad?

10 Answers  


WHAT IS THE USE OF "FUNCTION GENERATOR" IN QTP?

2 Answers  


Categories