vbscript - How to iterate visible rows alone using UFT -


when iterate below webtable,i getting row count 3(with hidden row). can see 2 rows in application. can row count of descriptive programming,but want iterate rows visible.

<table>  <tbody>   <tr class="show">name</tr>   <tr class="hide">ticket</tr>   <tr class="show">city</tr>  </tbody> </table> 

i have tried below code,but displays hidden row text well,

for i=1 rowcount   print owebtable.getcelldata(i,2) next 

actual output- name, ticket, city

expecting output- name, city

uft has no way knowledge of show/hide class names. if want filter out rows need yourself.

set desc = description.create() desc("html tag").value = "tr" desc("class").value = "show"  set cells = owebtable.childobjects(desc) print "count: " & cells.count = 0 cells.count - 1     print & ": " & cells(i).getroproperty("inner_text") next 

note had add td elements table in order work since it's invalid html have text in tr element.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -