代码之家  ›  专栏  ›  技术社区  ›  Matt Gibson

我如何编写Behat步骤,从Goutte驱动程序中捕获截图?

  •  1
  • Matt Gibson  · 技术社区  · 11 年前

    我需要将HTML保存在某个文件中,以便在浏览器中打开它。

    1 回复  |  直到 11 年前
        1
  •  2
  •   Matt Gibson    11 年前
    /**
     * @Then /^show me the page$/
     */
    public function show_me_the_page() {
    
        $html = $this->getSession()->getDriver()->getContent();
        file_put_contents('/tmp/behat_page.html', $html);
    }
    
    推荐文章