0

我正在使用 Ghost.py 填写表格。提交表单后,我得到相同的页面。代码:

url_local = 'url'
gh = Ghost()
page, name = gh.create_page()
page.open(url_local, wait_onload_event=True)
page.wait_for_selector('#id_username')
page.set_field_value('#id_username', '1')
page.set_field_value('#id_password', '1')
page.capture_to("1.png")
page.fire_on('form', 'submit')

page.capture_to("2.png")

我怎样才能获得下一页?

4

1 回答 1

0

提交后尝试等待使用

page, resources = ghost.wait_for_page_loaded()

然后捕捉它

于 2014-08-28T09:39:06.293 回答