gaozhao1989 / pyjab

Python implementation for Java application UI automation with Java Access Bridge
GNU General Public License v2.0
49 stars 20 forks source link

scroll to view #15

Open szczepanR opened 2 years ago

szczepanR commented 2 years ago

Hi, some time ago I wrote an email to you about a specific function which I called "scroll to view". The idea is to scroll to see elements from the list which are outside from the visible area. I know that you implemented the scroll function with press scrollbar time but it is hard to use it when you don't have full control over the list (the number of the elements is not fixed). Any chance to implement that function?

gaozhao1989 commented 2 years ago

Hi @szczepanR, Thanks for your feedback on this. Unfortunately JAB does not provide API to control the scroll, slide... So, that mean pyjab can only scroll the bar use mouse action. And also the does not found value change on scroll bar which can monitor the position of scroll bar. But I have found the another attribute "PropertyVisibleDataChange" changed when scroll bar, will try if this related with position of scroll bar.

szczepanR commented 2 years ago

Great thanks for working on this. I thought that it can be possible by comparing the bounds of the parent and the actual location of the element on the list, i.e. if the element is not in the visible part of the parent window then try scroll and recheck. that is my idea to solve this.

gaozhao1989 commented 2 years ago

Thanks for your suggestion. Unfortunately, the parent element does not have visible "value" change can not found after scroll the bar. So, Will check with attribute "PropertyVisibleDataChange" later if this can be used.