@@ -32,7 +32,27 @@ $ composer require itnelo/reactphp-webdriver:0.x@dev
3232
3333## How to use
3434
35- Call a factory method to get your instance (recommended):
35+ Call a factory method to get your instance (recommended). The minimal configuration is:
36+
37+ ``` php
38+ use React\EventLoop\Factory as LoopFactory;
39+ use Itnelo\React\WebDriver\WebDriverFactory;
40+
41+ $loop = LoopFactory::create();
42+
43+ $webDriver = WebDriverFactory::create(
44+ $loop,
45+ [
46+ 'hub' => [
47+ 'host' => 'selenium-hub',
48+ 'port' => 4444,
49+ ],
50+ ]
51+ );
52+ ```
53+
54+ You can customize a set of parameters for the underlying [ ReactPHP Browser] ( https://github.com/reactphp/http#browser )
55+ and tune driver options:
3656
3757``` php
3858use React\EventLoop\Factory as LoopFactory;
@@ -45,7 +65,7 @@ $webDriver = WebDriverFactory::create(
4565 [
4666 'browser' => [
4767 'tcp' => [
48- 'bindto' => '192.168 .56.10:0',
68+ 'bindto' => '192.169 .56.10:0',
4969 ],
5070 'tls' => [
5171 'verify_peer' => false,
@@ -63,7 +83,7 @@ $webDriver = WebDriverFactory::create(
6383);
6484```
6585
66- Manual configuration (if you want to configure each component as a separate service, e.g. compiling a DI container
86+ Manual configuration (if you prefer to configure each component as a separate service, e.g. compiling a DI container
6787and want to reuse existing service definitions):
6888
6989``` php
@@ -80,7 +100,7 @@ $socketConnector = new SocketConnector(
80100 $loop,
81101 [
82102 'tcp' => [
83- 'bindto' => '192.168 .56.10:0',
103+ 'bindto' => '192.169 .56.10:0',
84104 ],
85105 'tls' => [
86106 'verify_peer' => false,
0 commit comments