Micro Focus QTP (UFT) Forums
Object identification issue - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Object identification issue (/Thread-Object-identification-issue)



Object identification issue - vijayendra.shukla - 05-28-2010

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.


RE: Object identification issue - guin.anirban - 05-28-2010

If it is taking time then you can go for document object model (DOM).


RE: Object identification issue - vijayendra.shukla - 05-28-2010

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.


RE: Object identification issue - guin.anirban - 05-28-2010

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.