0

Using selenium to automate saving bill slips as PDF, it comes to the point where a system's dialogue box pops up and I need to automate clicking "save" button in that box. Can I achieve that using pywin32 or pywinauto?

I tried pressing the enter key on keyboard after the dialogue box pops up, using the pynput module but that is not working.

My code:

def thread_function():
    keyboard = Controller()
    keyboard.press(Key.enter)
    keyboard.release(Key.enter)
    return

thread1 = threading.Thread(target=thread_function)
thread1.start()
  • It's possible using pywinauto, but Seleium has its own features to download something. I'm not familiar with it in Selenium, but I know it does exist. – Vasily Ryabov Mar 31 '22 at 15:40
  • Check this thread to find out how to download directly using selenium https://stackoverflow.com/questions/35331854/downloading-a-file-at-a-specified-location-through-python-and-selenium-using-chr – juhat Apr 13 '22 at 15:58

0 Answers0