承接 ikr/php-webdriver-journal 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ikr/php-webdriver-journal

最新稳定版本:v0.1.4

Composer 安装命令:

composer require ikr/php-webdriver-journal

包简介

A journaling proxy object over the Facebook's WebDriver

README 文档

README

Build Status

Summary

A journaling proxy to the Facebook's WebDriver. Wraps a WebDriver instance, and complements the original method calls with taking screen-shots, and capturing the browser log messages. As the result, a journal of the executed browser session is created: an HTML document with embedded screen-shots, DOM query records, console messages, etc.

Why?

We have an automatic headless screen-scraping tool implemented with Selenium + PhantomJS (no idea why PhantomJS by itself wasn't enough). Sometimes it screws up: ticket order fails, wrong kind of tickets gets selected, or a child name gets confused with an adult name. This tool is summoned to ease the debugging of such failures.

Installation

$ composer require ikr/php-webdriver-journal

API

$driver = \RemoteWebDriver::create(
    $seleniumHubUrl,
    \DesiredCapabilities::phantomjs()
);

$wrappedDriver = new \WebDriverJournal\WebDriverProxy(
    $driver,

    new \WebDriverJournal\Probe(
        $driver,

        new \WebDriverJournal\Journal(
            new \WebDriverJournal\DirectoryFilesWriter(
                '/tmp/web-driver-journals',
                $browserSessionIdOfYourChoice
            )
        )
    )
);

$wrappedDriver->manage()->window()->setSize(new \WebDriverDimension(1024, 1024));
$wrappedDriver->manage()->timeouts()->implicitlyWait(8);

$wrappedDriver->get('https://ikr.su/');
$wrappedDriver->findElement(\WebDriverBy::id('btn-next'))->click();
// ...
$wrappedDriver->quit();

Maturity

Still experimental: v0.1.x

统计信息

  • 总下载量: 97
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-09