1

I cant seem to find out how to put text into a text box on a webpage then activate a button. I've tryed seeing if urllib supports this but I've noticed it only supports reading and not writing. So are there any modules that support writing in a text box and activation of buttons on a webpage using python?

Tom
  • 71
  • 1
  • 2
  • 11
  • Possible duplicate of [Using Python To Interact with Webpages](http://stackoverflow.com/questions/20940033/using-python-to-interact-with-webpages) – oystein-hr Jan 25 '16 at 10:43
  • urllib only send, receive data - it doesn't render page so it doesn't know what text box is. – furas Jan 25 '16 at 10:51
  • when you put text into text box and press button then browser send this data to server - and urllib can send this data too. – furas Jan 25 '16 at 10:53

1 Answers1

1

Yes, the solution you're looking for is called Selenium WebDriver, which has a python binding to work interactively with web pages. You can use a variety of browser clients with WebDriver, including FireFox, Chrome, and IE, along with my favorite: PhantomJS which is a headless browser that works great with server apps.

See the article on https://realpython.com/blog/python/headless-selenium-testing-with-python-and-phantomjs/ for a quick introduction.

Cahit
  • 2,484
  • 19
  • 23