Micro Focus QTP (UFT) Forums
VALUE, INNERTEXT property from WebEdit and WebElement objects - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: VALUE, INNERTEXT property from WebEdit and WebElement objects (/Thread-VALUE-INNERTEXT-property-from-WebEdit-and-WebElement-objects)



VALUE, INNERTEXT property from WebEdit and WebElement objects - AGE_WACH - 12-12-2008

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.


RE: VALUE, INNERTEXT property from WebEdit and WebElement objects - surya_7mar - 12-14-2008

for WebEdit - GetROProperty ("value") should return the value of a webedit into a parameter//./


RE: VALUE, INNERTEXT property from WebEdit and WebElement objects - AGE_WACH - 12-15-2008

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?


RE: VALUE, INNERTEXT property from WebEdit and WebElement objects - surya_7mar - 12-16-2008

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


RE: VALUE, INNERTEXT property from WebEdit and WebElement objects - bfakruddin - 12-22-2008


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...