jeanphix/Ghost.py

Cannot submit forms on certain sites under Python 2.7

Closed this issue · 0 comments

This is probably related to #217.

Tried the following with both PySide and PyQt on Mac OS X El Cap (10.11.2), and literally nothing happens. Tried using expect_loading=True, still nothing.

import ghost
session = ghost.Ghost().start()
session.open("https://google.com")
session.fill("form", {"q": "test"})
session.call("form", "submit")

With display=True or session.display(), I can't even click the search button. Nothing happens. I can navigate to other pages by clicking anchors just fine.

Run the exact same code under Python 3.x, tested in a docker container running Debian (jessie) with Python 3.4.4 and PySide, and it works (although with expect_loading=True, it times out, despite actually loading the search results page). Tested on Windows 10 running 3.4.4 and it works as well.

I'm still investigating the root cause, but this is a pretty crippling bug, and I can't use Python 3.x for a number of other reasons. Any workarounds or solutions would be appreciated.

Apparently it's just broken with PyQt. Using PySide just works.