【问题标题】:How can i get next page after submit form using Ghost.py使用 Ghost.py 提交表单后如何获取下一页
【发布时间】:2014-08-28 09:28:37
【问题描述】:

我正在使用 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")

我怎样才能获得下一页?

【问题讨论】:

    标签: javascript python forms form-submit ghost.py


    【解决方案1】:

    提交后尝试等待使用

    page, resources = ghost.wait_for_page_loaded()
    

    然后捕获它

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-05
      • 1970-01-01
      相关资源
      最近更新 更多