Micro Focus QTP (UFT) Forums
Strange behave with web table - 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: Strange behave with web table (/Thread-Strange-behave-with-web-table)



Strange behave with web table - linhke - 10-21-2010

Hi,

I have a strange behave when getting the row number of a table. I can not find any reason and need your help. With the same code:
i = Browser("Cyber").Page("ArchivedShipments").WebTable("tblShipping").RowCount
When i run from top to button of all script, the retrieve value is (i = 1), but when debug only this step, the retrieve one is (i =7) (true value). I don't know why? Can any one help me on that?

Thanks,
linhke


RE: Strange behave with web table - KavitaPriyaCR - 10-21-2010

Hi
row count may be changing dynamically when you are running the script. Run the script, when the run is at this step, stop the test and check the row count. Check if any other table with same property exists in the application. Is there any criteria prior to this web table which can change the table row/col?


RE: Strange behave with web table - cdesserich - 10-22-2010

Almost sounds like the value for "i" is being changed after this line of code. If you are only getting 7 when you run that one line of code, make sure you are not assigning "i" a new value later in the script.