Micro Focus QTP (UFT) Forums

Full Version: Object identification issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am having a script which is taking too much time to identify a cell data within a webtable.
all the objects are in OR. When i use highlight property to highlight the webtable in the page, it is successfully identifying the webtable. But when i use the code to get the cell data within the webtable, it takes around 3 minutes to get that data and sometimes it just hangs up.

Below is the code..

Code:
Services.StartTransaction "CR Ready status"
sData = Trim(Browser("ABC").Window("ADA").Page("ADA").WebTable("Doc Type").GetCellData(2, 6))
Services.EndTransaction "CR Ready status"

I have inserted the transaction command to check how long it waits for getting the cell data. It roughly comes around 3min or more and like i said sometime script gets hanged..
I am not able to figure out the reason behind this abnormal behavior.
Any help would be great.
If it is taking time then you can go for document object model (DOM).
Anirban, I have never used the document object model (DOM). Can you please explain me how can i use it here? Or any reference will also suffice. Thank you for your time.
You can visit to the following site: http://w3schools.com/jsref/dom_obj_document.asp

But one thing i want to suggest you that DOM is the last option for automation. We need to use DOM when other ways gets failed for automating any controls.

You try with other properties to identify the table properly. Try to analysis the result as well. I think you will definitely get the solution.