| || |
Bitmap check point
Will Bitmap checkpoint work for data driven scenarios?. we need to verify certain values in a HTML web table however, the cell values are dynamic, and there are several workflows that drive these values and position of these values in the web table. hence we are considering to use a Bitmap checkpoint. I know this is not an idea solution, however I am wondering if inserting a bitmap checkpoint will ever work if your data changes?. that is I will insert this checkpoint while recoding with one data record, but will it work on all row of the data table?.
QTP does a pixe; comparison. The match will fail if a set percentage of required pixels do not match.
What type of variance happens on each of your iterations? Is the graphic expected to look different?
Yep, I agree. However this is the situation, we send the input form with certain values and the webpage(HTML) report is generated out of our input and we need to validate certain values like( ex: 2 fields where in it calculates the total $amounts.) in the webpage , and these are dynamically displayed on the page in a form of table. atleast that is how QTP is recognising the frame around these fields.
The object hierarchy as per QTP is Browser.page.webtable.
However when I looked at HTML coding there is not object reference hence its understood that these are dynamically populated based on some calculaiton logic behind the scenes.
so wondeirng is the only way to code this is to code the actual logic that is used to calculate these values so we know the position(cell address) of these fields in the webpage?. or is there any other way?.
the coding I tried to figure out what cell the field is displayed
'For i=1 to RC
For j=1 to CC
msgbox "(" & i &"," & j & ")" & browser("Browser").Page("Page").WebTable("Line").G etCellData(i,j)
in the above code I noticed each iteration, the cell number is changed for the value that i am looking.
So absolutley no clue on which cell it will be populated.
Last edited by MyQTP; 11-13-2013 at 07:40 AM.
I'm not sure how we went from chatting about graphics and then went to tables. But that is OK.
Is there column and header row that you can tri-angulate on? It sounds as if the cell row,column changes.
Sometimes I have to find out the row number and column number. Then meet in the middle to get the cell I want.
Tried your above tip, but unable to get the cell address
For i=1 to RC
For j=1 to CC
cellvalue= browser("Browser").Page("Page").WebTable("Line_2") .GetCellData(i,j)
if cellvalue="Paid" Then
amount=(rc,j)..the above code did not work, I am unable to locate the column address where it has the value "PAID
When you are stepping through the inner and outer loops, is there a pattern of what cells it is returning?
Is it returning values of cells? If you are looking for a column name, I think that you can set the row to a constant 1 or 0. No need to vary the row.
Last edited by bklabel1; 11-14-2013 at 06:12 PM.
Reason: clarifying what I meant to say.
It is possible that the column headers are not in the table. Maybe they are separate object that are labels out side of the table.
You can turn on recording and make a check point on the grid. While making the check point qtp showsa grid with check point properties. It is a good way to know how qtp sees the cells.
sure, worked the logic now, I have progamatically captured the runetime value of the column I am looking for.