Python win32gui to scroll Internet Explorer / Firefox / web browser window

I got it for work by sending him the key up / down and / or the page down / up button, but I want to use a more proprietary way, especially for scrolling the number of X.

I tried these:

win32gui.PostMessage(self.find_scrollable(), win32con.WM_MOUSEWHEEL, win32con.WHEEL_DELTA * 3)

win32gui.PostMessage(self.find_scrollable(), win32con.WM_VSCROLL, win32con.SB_LINEDOWN)

Without success.

However, these works:

    win32gui.PostMessage(window, win32con.WM_KEYDOWN, key)
    win32gui.PostMessage(window, win32con.WM_KEYUP, key)
+3
source share
1 answer

You can try PyWinauto. This will give you more tools to work with.

0
source

All Articles