Interact with table

Asked by hidde on 2020-07-02

Hello Everyone,

I am using Sikuli using Java and within the AUT (application under test), I am trying to loop through a table.

The following is what I already tried:

//Define the region using an image (table_content.png)
Region region = screen.find(table_content.png).setRaster(4,8) // <--- I know this will return the getCell(0,0)

from here I would like to loop through all the columns and cells, but not sure how to?

The region.getRows() // <- returns 0

If there is a better way to do this, please feel free to suggest!

Thanks in advance for all the support!

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2020-07-02
Last reply:
2020-07-04
masuo (masuo-ohara) said : #1

[example code with Python]
maxRows = 3
maxColumn = 4
setRaster(maxRows,maxColumn)
for r in range(maxRows):
    getRow(r).highlight(1)
    for c in range(maxColumn):
        getCell(r,c).highlight(1)

Can you help with this problem?

Provide an answer of your own, or ask hidde for more information if necessary.

To post a message you must log in.