How to specify column for getRowNumbers() method to count number of rows for only specified column

So, I’m really new to this automation stuff and I need some help.
For now I’m running test using Excel as data file. My excel data file contains several columns of data(for different test web pages).
And now I’m trying to run a test case that verifies login page texts. In data file all required values are set in Column A and has 14 rows. However, when I run the test case, it will do 16 verifications instead of 14(rows). I assume that happens because same excel data file has 16 values set in Column B. So the question is, how to set specific column for getRowNumbers() method, to count row number only for Column A?

So far script looks like this(very basic stuff I believe):

ExcelData data = findTestData('textPresentDATA') for (def index : (0..data.getRowNumbers() - 1)) { WebUI.verifyTextPresent(data.internallyGetValue("LOGIN_PAGE", index), false) }

I would appreciate any help. Thank you!

Mindaugas, I’m afraid that this is behavior of Excel sheet when it locate the table. I think we could make an word-around by adding a check (not null/empty) before verifying the Text.

I am getting an error when I provide integer variable on internallyGetValue() function.
i.e see below

If I write internallyGetValue(0,0) its running fine.

But when I wrote
int a=0;
int b=0;
internallyGetValue(a,b)
then it throws an error , any help will appreciate.

The internallyGetValue functions receive 2 params: column (string) and the index

internallyGetValue(0,0) its running fine: does it return the correct value?

What is the error you have on the later command?

See the below two snapshots:

In the first example, the help window shows int columnindex and when we use variable name instead of the number then the help window shows String. Why?

Image 2.jpg

image-1.jpg