jordan-thiriet / casperjsphp
PHP wrapper for CasperJS
Installs: 51
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/jordan-thiriet/casperjsphp
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-12-21 00:22:35 UTC
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());