Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Cell element in Select Cells property #61

Open
HuyNguyen7994 opened this issue Aug 5, 2022 · 4 comments
Open

Get Cell element in Select Cells property #61

HuyNguyen7994 opened this issue Aug 5, 2022 · 4 comments

Comments

@HuyNguyen7994
Copy link

I want to get the elements listed in Select Cells, but JABElement.get_cell method seems to get from Cells, which cannot be interacted with in my case.
MicrosoftTeams-image

Originally posted by @HuyNguyen7994 in #57 (comment)

@HuyNguyen7994
Copy link
Author

For same field, elements in Cells property have the depth of 0 and no dimensions, while in Select Cells property they have meaningful depth and dimensions. Yet both find_* and get_cell method only return elements in Cells.
Elements in Select Cells property (currently inaccessible):
image
Elements in Cells property (accessible with both find_* and get_cell):
image

@HuyNguyen7994
Copy link
Author

HuyNguyen7994 commented Aug 5, 2022

We can reach the element with get_selected_element
image
image

but this requires the element to be manually selected first
image

@HuyNguyen7994 HuyNguyen7994 changed the title Get Cell element in Select Cells Get Cell element in Select Cells property Aug 5, 2022
@gaozhao1989
Copy link
Owner

Hi @HuyNguyen7994,

It seems No JAB API can get selected cells in table.
you can reference with below functions and check if specific cell is selected or not, then get selected cell

BOOL getAccessibleTableRowSelections(long vmID, AccessibleTable table, jint count, jint *selections);

BOOL getAccessibleTableColumnSelections(long vmID, AccessibleTable table, jint count, jint *selections);

@HuyNguyen7994
Copy link
Author

I was able to grab the element by setting visible=True in get_cell method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants