Micro Focus QTP (UFT) Forums
output check point - 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: output check point (/Thread-output-check-point)

Pages: 1 2


output check point - sdazad - 10-29-2011

Hello,
I need help in capturing text output value in Descriptive Programming(DP). So far I capture it record and play back mode. But I want to capture it without recording in DP way. If anyone knows pls share with me.
Thanks,
Mohammad Azad
sdazad@gmail.com


RE: output check point - ravi.gajul - 10-29-2011

Code:
DataTable("A",dtGlobalSheet)= Browser("name:=Google").Page("title:=Google").WebElement("html id:=addlang").GetRoProperty("innertext")
The above code is an example to get text from google main page


RE: output check point - sdazad - 10-31-2011

Hi,
Thanks for reply. But It didn't work. Its giving me error message.

By the way, what is warnings in QTP result? is it error or caution?

Thanks once again.
Azad



RE: output check point - ravi.gajul - 10-31-2011

Hi ,
Please post the error message.

And warnings in QTP are cautions and not errors.A test can pass though there are warnings. For example, warnings are seen in the result when smart identification in invoked for object identification.However its a passed test case

Regards,
Ravi


RE: output check point - sdazad - 10-31-2011

Hi'
Here is the error message. Infact I am trying to capture dynamic numeric value from webpage.
message:
Cannot identify the object "[ WebElement ]" (of class WebElement). Verify that this object's properties match an object currently displayed in your application.

Line (58): "DataTable("MPI","Global")= Browser("micclass:=Browser").Page("micclass:=Page").WebElement("html tag:=H3","outerhtml:=<H3>$2,997.75</H3>").GetRoProperty("innertext")".

Thanks,
Azad


RE: output check point - ravi.gajul - 10-31-2011

Yes there is a problem with the code and we can capture the dynamic values from webpage using DP.
In the above code outer html value has got special characters so we cannot directly give its value in the code .It should be normalised.However there could be other properties to uniquely identify the WebElement.Try using other properties like html id.If you are unable to determine such properties
Please post the obj spy snapshot of the web element so that I can help you determine the same.

Note: It need not be innertext always.Look for the property name thats holding the value you want to fetch and give its name in
.GetRoProperty("<name of the property holding the value required by you>")


RE: output check point - sram24 - 10-31-2011

Hi,
Try this
Code:
Browser("xxx").Page("xxx").WebRadioGroup("xxx").Output CheckPoint("checkpoint 1")

Where checkpoint 1 values will call the datasheet parameter value.

Regards,Ram


RE: output check point - sdazad - 10-31-2011

Hi,
I have enclosed the object spy snapshot. I cropped it so that it can fit in uploadable size.

Thanks and regards,
Azad



RE: output check point - Ankesh - 10-31-2011

Hi Azad,

sorry, but till now i could not get what you are trying to achieve!!

If you can explain your scenario a bit, it would be better for me to resolve ur query.

Regards,
Ankesh


RE: output check point - sdazad - 10-31-2011

Hi Ankesh,
My intention is to capture dynamic output values from a web page using descriptive programming. I was trying following way-

Code:
Datatable.GlobalSheet.AddParameter"MPI",""
DataTable("MPI","Global")= Browser("micclass:=Browser").Page("micclass:=Page").WebElement("html tag:=H3","outerhtml:=<H3>$2,997.75</H3>").GetRoProperty("innertext")

But, I am not able to capture that value in data table or any variable. I have enclosed the screenshot of properties and values of that object.

Regards,
Azad