Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to retrieve value of a text output?
#1
Not Solved
I am using a script against a web page that creates pension quotations.
I am outputting the various results to the DataTable but I also want to have the values available in my code.

On one page, these values are contained in TextBox controls and so I can get the value in my code with GetROproperty.
I can also get the value from my CheckPoint object with GetTOproperty, which seems odd but it works:

Code:
Browser.Page.WebEdit("result1").Output CheckPoint("first")
myresult = WebEdit("result1").GetROproperty("value")
sameresult = CheckPoint("first").GetTOproperty("value")


However, on my next page, the values are just in HTML. My Output object (I call it a CheckPoint but not sure it is) says it will "output the text that is displayed between xxx and yyy into <zzz>". This outputs to the datatable but I can't retrieve the value (unless I read it back from the table). I have no web object to interrogate, and I don't seem to be able to add the output region as an object in the OR. And for some reason, the CheckPoint object in my code has no properties I can access this time. The IntelliSense says it has 'getproperty', 'setproperty', 'output' and 'check' but none of these seem to work, nor do RO/TOproperty.

Code:
Browser.Page.Output objCheckPoint 'This works
myresult = objCheckPoint.GetTOproperty("value") 'this doesn't


I expect I'm doing something wrong, but I can't see how I can get the value from the text area on the page. Can you help?
Apologies for length
Paul
Reply
#2
Not Solved
Hi Paul,
Rename a DataTable column to OutPutValue. Now while adding output checkpoint, click Modify button and select this column to save the output text. Now you can fetch the out put text from this DataTable Column by using "DataTable.GlobalSheet.GetParameter("OutPutValue").
Reply
#3
Not Solved
Hi, and thanks
Yes I could get the value from the table but I wanted to avoid doing this.
OK, I'll go into why:

My test team run say 1000 cases and then find that maybe 10% of them have no values. It seems values are calculated but they don't make it into the grid. So I've had to write routines that check they've been written, and if not, do it again.
So you see, I can't get the value from the grid as that is what I'm testing, whether it's there or not.
Here's my sub:

Code:
Sub WriteResult(objWebEdit, objCheckPoint, ColName)
    checkValue = objWebEdit.GetROProperty("value")
    Do
        objWebEdit.Output objCheckPoint
        Wait 0,100
    Loop Until DataTable(ColName,dtGlobalSheet) = checkValue
End Sub

On the 'text region' outputs I can only check for the table value being > vbnullstring.
Is there really no way to get the value in code? It seems bizarre!
Cheers
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  table output values shipu 1 2,234 01-24-2014, 10:06 AM
Last Post: supputuri
  QTP Automation: How to retrieve Reporter.Reportevent Message scsenthil 1 5,257 11-14-2013, 07:51 PM
Last Post: spannerj
  How to retrieve ArrayList saved in Environment Variable Gautam26 8 4,441 11-07-2013, 08:26 PM
Last Post: ssvali
  Read text from text file and save it into a variable in qtp arpan 3 12,088 06-19-2013, 08:34 PM
Last Post: arpan
Exclamation Retrieve the complete height and width of a browser beyond the visible part as wel learnQtptips 0 2,013 05-22-2013, 09:36 AM
Last Post: learnQtptips

Forum Jump:


Users browsing this thread: 1 Guest(s)