Search code examples
pythonpywinauto

Select options not visible on screen Python/Pywinauto


I'm using...

  • Pywinauto 0.6.8
  • Python 3.10.7
  • Windows 10

I use pywinauto to locate a text and click on it, but I have a scrollable list, so when I ask it to find the last text in the list that is not visible, it locates and clicks on it, but the click does not take because is below the scroll.

pywinauto clicks on the red area

A possible solution I thought would be to press the down arrow on the keyboard and for each item in the list selected, it compares with the variable of the text I want it to click on, but I don't know how to do that, could someone help me?


Solution

  • One possible solution is to use pywinauto.mouse to scroll down a little, compare the text, and then click.