Skip to content

Commit

Permalink
bump readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Fonseca committed Aug 7, 2015
1 parent c0e8809 commit 6ec442c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,50 @@ With Composer:

### Usage


### Library

You can create a downloader, a starter, a stopper and a watcher.
E.g. to create a starter:

```
$seleniumStarterOptions = new SeleniumStartOptions();
$process = new Process('');
$exeFinder = new ExecutableFinder();
$waiter = new ResponseWaitter(new Client());
$starter = new SeleniumStarter($seleniumStarterOptions, $process, $waiter, $exeFinder);
```

Then you can call:
```
$starter->start();
```
And it will just work.

Of course, you can also change de default settings.
This is done by calling options classes that each one if this has.
E.g. to change a setting for the starter:

```
// timeout is changed in the "waitter" class:
$starter->getResponseWaitter()->setTimeout($input->getOption('timeout'));
// to set a specific selenium location you do:
$starterOptions = $starter->getStartOptions();
$starterOptions->setSeleniumJarLocation($input->getOption('selenium-location'));
// to enable xvfb:
$starterOptions->enabledXvfb();
```

**see the tests and the built-in commands for more examples, or open an issue**

You can also create a "handler" that will allow you to start, stop, download, etc. through one single class.
```
$this->handler = new SeleniumHandler($starter, $stopper, $downloader, $logWatcher);
```


### Built-in commands

#### get selenium
`(it will download to current directory by default)`

Expand Down

0 comments on commit 6ec442c

Please sign in to comment.