Highlighted
Absent Member.
Absent Member.
772 views

TruClient RowCount

Jump to solution

All,

Is there a way to use Truclient to get a rowcount?

My goal is something like UFT, if I query for something I want to confirm that rows of data where returned?

I'm using 12.5 and I tried a generic browser action with no luck. Its able to see the table but cant figure out how to get a row count on it.

Thank You

-Shu

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: TruClient RowCount

Jump to solution

Hi,

Use a "Generic Object Action" (not Browser), choose the table as the object, change the default action of the step to "Evaluate JavaScript" and run JavaScript code in the code argument entry to identify that. 

Here are a couple of references, but you'd need to inspect your application DOM in order to determine how to apply below examples on your application

http://stackoverflow.com/questions/3053503/javascript-to-get-rows-count-of-a-html-table

http://www.w3schools.com/jsref/coll_table_rows.asp

Regards,

Shlomi

 

View solution in original post

2 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: TruClient RowCount

Jump to solution

Hi,

Use a "Generic Object Action" (not Browser), choose the table as the object, change the default action of the step to "Evaluate JavaScript" and run JavaScript code in the code argument entry to identify that. 

Here are a couple of references, but you'd need to inspect your application DOM in order to determine how to apply below examples on your application

http://stackoverflow.com/questions/3053503/javascript-to-get-rows-count-of-a-html-table

http://www.w3schools.com/jsref/coll_table_rows.asp

Regards,

Shlomi

 

View solution in original post

Highlighted
Absent Member.
Absent Member.

Re: TruClient RowCount

Jump to solution

Thank you!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.