Ghost.py
Ghost.py copied to clipboard
Always getting Unable to Load requested page when submitting a form.
example code:
from ghost import Ghost
url = "https://www.google.com" gh = Ghost()
We load the main page of google
page, resources = gh.open(url) result, resources = gh.fill('form',{ 'q':'test' }) #works based on screenshot ('test' is filled in on main search form).
Save the image of the screen
gh.capture_to("before_submit.png")
page, resources = gh.fire("#gbqfq", "submit", expect_loading=True)
returns "ghost.ghost.TimeoutError:Unable to load requested page"
assert page.http_status==200
gh.capture_to("after_submit.png")
Have realized fire_on has changed to 'fire' (correct?). Always getting unable to load though. Have googled, and many others are having the same problem. Would it be possible for you to give a very basic example? (Have tried gits posted by users that seemed to work in the past, and still have the issue).
Running Python 2.7 on Windows.
Thanks so much..
btw, this is the source that I tried that also returns "ghost.ghost.TimeoutError:Unable to load requested page"
https://github.com/jeanphix/Ghost.py/issues/141
try
gh.call('form', 'submit', expect_loading=True)