承接 jordan-thiriet/casperjsphp 相关项目开发

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

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

jordan-thiriet/casperjsphp

Composer 安装命令:

composer require jordan-thiriet/casperjsphp

包简介

PHP wrapper for CasperJS

README 文档

README

php-casperjs is a library PHP for wrapper CasperJs and write easily functional testing.

Installation

Before using php-casperjs, you need to install both library:

1 - PhantomJS http://phantomjs.org/download.html

2 - CasperJS http://casperjs.org/installation.html

Usage

<?php

$casper = new \CasperJS\Casper(1280,800,"script/test.js");
$casper->start("http://spallian.com/");
$casper->click('//*[@id="menu-item-7376"]/a');
$casper->forStart(1,21);
$casper->setValue('//*[@id="post-7148"]/div/div/div[{i}]/div/div[2]/h5','username');
$casper->getValue('username');
$casper->captureSelector('//*[@id="post-7148"]/div/div/div[{i}]/div/div[1]/img','capture/{username}.jpg');
$casper->forEnd();
$casper->run();
print_r($casper->getOutput());
        

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-12