Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VALUE, INNERTEXT property from WebEdit and WebElement objects
#1
Not Solved
Hello, I am new to this forum but have started to use QTP 9.5. I have some simple questions that I hope can be answered on this forum.

I have a web based application and am attempting to pull information ("scrape") from some of the objects.

Two in particular. A textbox (WebEdit type object) and a WebElement type object. In both cases I have noticed a few things -

For a WebEdit type object , I cannot use the GetROProperty method to pull the string that is displayed on the app form (this is the VALUE propety).

For WebElement objects, GetROproperty works to pull the INNERTEXT property, but it pulls it from the object that resides in the repository. Thats fine for static data, but not if something changes (like Date Requested).

For the both of the above, running the Check (CheckPoint) method works fine to show if a change has occured.

My goal - for both objects, pull the INNERTEXT and VALUE values displayed on the app into a string and write out to a file if I need to.

Does anyone have any suggestions? Especially for WebEdit type objects?

Some things I have attempted -
1. Using the GetProperty(s) method - I wasn't able to pull the VALUE property into a variable.
2. Setting the actual string in the VALUE properties box as an inner enviornment but was not succesful (i probably screwed something up here).

Thanks again for any help.
Reply
#2
Not Solved
for WebEdit - GetROProperty ("value") should return the value of a webedit into a parameter//./
Reply
#3
Not Solved
You are correct. It does. But it is pulling the value from the object that is already stored in the repository. GetROProperty("value") wont pull a new value from the application GUI, only what was recorded when the object was put into the repository.

I ran a few trials to prove this. Namely on a "Date" field. Even though the script was ran on other days, the "value" was still being pulled from the repository (original date of capture). Hence... the script was recording a failed.

Has your experience been different?
Reply
#4
Not Solved
usually i will never put value as one of the property of the object repostiory entry and also i never get this typw of issue that you are talking.

I using "Value" property widely and it never given me a problem.

Try to spy webedit with different values in the webedit see if the Value property changing or not. If not changing then you should go for otther property
Reply
#5
Not Solved

Hello Age,

Your question is nice, I tried on both webedit and webelement.. as per you Webedit have "value" property and webelement have "Inner text" property but you said that getroproperty is returning a value from OR, Getroproperty never get a value from OR, only GetToProperty only get a value from OR. GetRoProperty dynamically get a value from application while executing the script.

var=object.getroproperty("value")
print var

definitely it brings a value from webpage, not from OR

thanx...
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Count number of WebElement with certain property hari1024 1 18,363 01-13-2012, 05:33 AM
Last Post: vIns
  Need help retrieving innertext of a link pujamukho 3 3,954 05-03-2011, 07:11 PM
Last Post: Charanpreet
Question WebEdit name property Charanpreet 7 9,116 04-13-2011, 03:14 PM
Last Post: Jay
  How to store a value from InnerText property to an Array ? shreyya 2 12,129 07-01-2010, 09:16 AM
Last Post: basanth27
  how to check checkbox's readonly property if developer has not used this property blanchedsouza 0 4,700 05-15-2008, 04:27 PM
Last Post: blanchedsouza

Forum Jump:


Users browsing this thread: 1 Guest(s)