简体   繁体   中英

QTP UFT Unable to find row count from table

I was not able to find row count of that table and when I spy, Object Respository doesn't show any webtable. Can you please help me on how to find the row count. It was developed in Angular Js framewrok.

Attached Object Repsoitory:
在此处输入图片说明

The DOM UI元素

The elements in the screenshot do not contain a TABLE element (only DIV s). Try running (in the browser's developer tools) document.getElementsByTagName('table') if it returns an empty set then this is the reason UFT isn't showing you a table.

UFT does not recognise Angular tables since they are non-standard. You can add support using WebExtensibility .

to get the row count from the table (not simple table its a grid)

Set objDesc = Description.Create
objDesc("micclass").value = "WebElement"
objDesc("class Name").value = "ui-gri-row.*"

Set ObjRows = Browser("").Page("").WebElement("class:=ui-grid-canvas").ChildObjects(objDesc)

msgbox "Row Count : " & objRows.Count

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM