<commit_before>Pigeon Webkit
=============

Functional testing tool for PHP built on top of [capybara-webkit](https://github.com/thoughtbot/capybara-webkit)

 * [Installation](#installation)
 * [How it works](#how-it-works)
 * [Usage](#usage)

## Installation

The following instructions outline installation using Composer. If you don't
have Composer, you can download it from [https://getcomposer.org/](https://getcomposer.org/)

 * Install QT following these [instructions] (https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit).
 * Install capybara-webkit

```
$ gem install capybara-webkit -v "1.3.1"
```

or

```
$ sudo gem install capybara-webkit -v "1.3.1"
```

 * Run the following command:

```
$ php composer.phar global require etsy/pigeon-webkit:dev-master
```

## How it works

capybara-webkit provides a headless web browser (built on QT Webkit). When the browser starts, it opens up a port to accept commands. Pigeon Webkit starts the browser, opens a TCP connection to that port and sends commands to the browser to "drive" it and run assertions.

FunctionalPigeon is extending CapybaraWebkitDriver, which is an implementation of Behat Mink's [DriverInterface] (https://github.com/Behat/Mink/blob/master/src/Behat/Mink/Driver/DriverInterface.php). As a result, most of the methods defined by the interface are available. The ones that are not implemented throw an UnsupportedException.

The css to xpath translation is handled by [the Symfony CssSelector component] (http://symfony.com/doc/current/components/css_selector.html)

## Usage

```php
$pigeon = new PigeonWebkit\FunctionalPigeon();
$pigeon->visit("https://etsy.com");
print_r($pigeon->body()); // HTML content of etsy.com
$pigeon->click("a#sign-in"); // opens the sign in modal
// ...etc
```<commit_msg>Fix the link to Mink because of the organization move<commit_after>Pigeon Webkit
=============

Functional testing tool for PHP built on top of [capybara-webkit](https://github.com/thoughtbot/capybara-webkit)

 * [Installation](#installation)
 * [How it works](#how-it-works)
 * [Usage](#usage)

## Installation

The following instructions outline installation using Composer. If you don't
have Composer, you can download it from [https://getcomposer.org/](https://getcomposer.org/)

 * Install QT following these [instructions] (https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit).
 * Install capybara-webkit

```
$ gem install capybara-webkit -v "1.3.1"
```

or

```
$ sudo gem install capybara-webkit -v "1.3.1"
```

 * Run the following command:

```
$ php composer.phar global require etsy/pigeon-webkit:dev-master
```

## How it works

capybara-webkit provides a headless web browser (built on QT Webkit). When the browser starts, it opens up a port to accept commands. Pigeon Webkit starts the browser, opens a TCP connection to that port and sends commands to the browser to "drive" it and run assertions.

FunctionalPigeon is extending CapybaraWebkitDriver, which is an implementation of Behat Mink's [DriverInterface] (https://github.com/minkphp/Mink/blob/master/src/Behat/Mink/Driver/DriverInterface.php). As a result, most of the methods defined by the interface are available. The ones that are not implemented throw an UnsupportedException.

The css to xpath translation is handled by [the Symfony CssSelector component] (http://symfony.com/doc/current/components/css_selector.html)

## Usage

```php
$pigeon = new PigeonWebkit\FunctionalPigeon();
$pigeon->visit("https://etsy.com");
print_r($pigeon->body()); // HTML content of etsy.com
$pigeon->click("a#sign-in"); // opens the sign in modal
// ...etc
```
{'fraction_non_alphanumeric': 0.12581344902386118, 'fraction_numerical': 0.0032537960954446853, 'mean_word_length': 4.746105919003115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3413694', 'n_tokens_mistral': 1176, 'n_tokens_neox': 1102, 'n_words': 369}