Skip to content

Instantly share code, notes, and snippets.

@ppadron
Created September 25, 2012 20:34
Show Gist options
  • Select an option

  • Save ppadron/3784276 to your computer and use it in GitHub Desktop.

Select an option

Save ppadron/3784276 to your computer and use it in GitHub Desktop.

Revisions

  1. Pedro Padron renamed this gist Sep 25, 2012. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. Pedro Padron revised this gist Sep 25, 2012. No changes.
  3. Pedro Padron created this gist Sep 25, 2012.
    12 changes: 12 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    <?php

    require_once 'php-webdriver/lib/WebDriver/ClassLoader.php';

    $driver = new WebDriver("http://localhost:4444/wd/hub");
    $session = $driver->session('chrome');

    $session->open('http://google.com/');

    // $session->window('current')->postSize(array('width' => 1024, 'height' => 4*1024));

    file_put_contents('banana.png', $session->screenshot());