2

Hi I have scenario that needs to upload a file in a webpage. Actually I know that selenium will not support file upload scenario. But this can be done in python with external libraries such as AUTOIT, PYWINAUTO. But the challenge is i have to run my code in a linux server that is going to call a windows remote machine.

When i tried installing pywinauto in linux server i got an error in importing winreg library. Hence i dont know how to proceed further. Please help me out to solve this scenario.

1
  • You're mistaken. Selenium does support file uploads, without resorting to hacks like AutoIt. It even will support uploading in the remote case where one is using the Selenium standalone server or Selenium Grid. Commented Sep 6, 2016 at 5:35

1 Answer 1

1

Both AutoIt and pywinauto are Windows-only libraries (at least for now). If you need to automate file upload on Linux, consider using AT-SPI accessibility (say pyatspi2 package).

If it's a server without X and DBus, I think the question is about remote code execution from Linux to Windows. Good option for the SSH remote execution is Fabric (very pythonic & nice), but using Cygwin or OpenSSH might be an additional challenge for you. There are many other tools like Ansible etc.

Sign up to request clarification or add additional context in comments.

1 Comment

atspi branch with Linux support is under development in pywinauto: github.com/pywinauto/pywinauto/tree/atspi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.