2017 © Pedro Peláez
 

library fork-squizlabs-php-sikuli

image

paysera/fork-squizlabs-php-sikuli

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 3 Versions
  • 19 % Grown

The README.md

About

PHPSikuli is a PHP5 wrapper for Sikuli., (*1)

Sikuli automates anything you see on the screen. It uses image recognition to identify and control GUI components., (*2)

Installation

Sikuli is a Java application, that works on Windows XP+, Mac 10.6+ and most Linux/Unix systems. It requires Java JRE 6 or JRE 7 to be installed., (*3)

Clone PHPSikuli which includes Sikuli jar file:, (*4)

git clone git@github.com:squizlabs/php-sikuli.git

Include either PHPSikuli.php or PHPSikuliBrowser.php in your project., (*5)

Documentation

Sikuli documentation can be found here. Most wrapper methods have same or very similar names however their usage slightly differ. E.g:, (*6)

// Python
topLeft = Location(reg.x, reg.y) # equivalent to
topLeft = reg.getTopLeft()

theWidth = reg.w # equivalent to
theWidth = reg.getW()

reg.h = theWidth # equivalent to
reg.setH(theWidth)

// PHP
$topLeft = $sikuli->createLocation($sikuli->getX($reg), $sikuli->getY($reg));
$topLeft = $sikuli->getTopLeft($reg);

$theWidth = $sikuli->getW($reg);

$sikuli->setH($reg);

Code Example

require_once 'PHPSikuli/PHPSikuliBrowser.php';

// Use Firefox.
$sikuli = new PHPSikuliBrowser('firefox');

// Go to Google.
$sikuli->goToURL('http://www.google.com');

// Search for 'Squiz Labs'
$sikuli->type('Squiz Labs');
$sikuli->keyDown('Key.ENTER');

sleep(1);

// Find the Squiz Labs Home page link on the search results page.
$link = $sikuli->find('Home');

// Highlight the found text (region) for 2 seconds.
$sikuli->highlight($link, 2);

// Click the link.
$sikuli->click($link);

The Versions

09/03 2018

dev-master

9999999-dev

  Sources   Download

The Requires

  • php >=5.3

 

09/03 2018

1.1.0

1.1.0.0

  Sources   Download

The Requires

  • php >=5.3

 

08/03 2018

1.0.0

1.0.0.0

  Sources   Download