Skip to content

Commit 1db3273

Browse files
committed
auto updated documentation
1 parent b35802b commit 1db3273

File tree

7 files changed

+96
-48
lines changed

7 files changed

+96
-48
lines changed

_includes/extensions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ extensions:
4848

4949
* `delete_successful` (default: true) - delete records for successfully passed tests (log only failed and errored)
5050
* `module` (default: WebDriver) - which module for screenshots to use. Module should implement `Codeception\Lib\Interfaces\ScreenshotSaver` interaface. Currently only WebDriver or any its children can be used.
51+
* `animate_slides` (default: true) - set false to disable sliding transition between screenshots
5152

5253
``` yaml
5354
extensions:

docs/04-FunctionalTests.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ Take a look at the complete reference for module you are using. Most of its meth
233233
Also you can access framework globals inside a test or access Dependency Injection containers inside `Helper\Functional` class.
234234

235235
{% highlight php %}
236+
236237
<?php
237238
namespace Helper;
238239
@@ -245,6 +246,7 @@ class Functional extends \Codeception\Module
245246
}
246247
}
247248
?>
249+
248250
{% endhighlight %}
249251

250252
Check also all available *Public Properties* of used modules to get full access to its data.

docs/modules/WebDriver.md

Lines changed: 76 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,91 @@ title: WebDriver - Codeception - Documentation
1212

1313
New generation Selenium WebDriver module.
1414

15-
### Selenium Installation
15+
### Local Testing
16+
17+
#### Selenium
1618

1719
1. Download [Selenium Server](http://docs.seleniumhq.org/download/)
1820
2. Launch the daemon: `java -jar selenium-server-standalone-2.xx.xxx.jar`
21+
3. Configure this module (in acceptance.suite.yml) by setting url and browser:
1922

23+
{% highlight yaml %}
2024

21-
### PhantomJS Installation
25+
modules:
26+
enabled:
27+
- WebDriver:
28+
url: 'http://localhost/'
29+
browser: firefox
30+
31+
{% endhighlight %}
32+
33+
#### PhantomJS
2234

2335
PhantomJS is a headless alternative to Selenium Server that implements [the WebDriver protocol](https://code.google.com/p/selenium/wiki/JsonWireProtocol).
2436
It allows you to run Selenium tests on a server without a GUI installed.
2537

2638
1. Download [PhantomJS](http://phantomjs.org/download.html)
2739
2. Run PhantomJS in WebDriver mode: `phantomjs --webdriver=4444`
40+
3. Configure this module (in acceptance.suite.yml) by setting url and `phantomjs` as browser:
41+
42+
{% highlight yaml %}
43+
44+
modules:
45+
enabled:
46+
- WebDriver:
47+
url: 'http://localhost/'
48+
browser: phantomjs
49+
50+
{% endhighlight %}
51+
52+
### Cloud Testing
53+
54+
Cloud Testing services can run your WebDriver tests in the cloud.
55+
In case you want to test a local site or site behind a firewall you should use a tunnel application provided by a service.
56+
57+
#### SauceLabs
58+
59+
1. Create an account at [SauceLabs.com](http://SauceLabs.com) to get your username and access key
60+
2. In the module configuration use the format `username`:`access_key`@ondemand.saucelabs.com' for `host`
61+
3. Configure `platform` under `capabilities` to define the [Operating System](https://docs.saucelabs.com/reference/platforms-configurator/#/)
62+
63+
{% highlight yaml %}
2864

29-
You will need to set a browser name to `phantom` in configuration.
65+
modules:
66+
enabled:
67+
- WebDriver:
68+
url: http://mysite.com
69+
host: '<username>:<access key>@ondemand.saucelabs.com'
70+
port: 80
71+
browser: chrome
72+
capabilities:
73+
platform: 'Windows 10'
3074

75+
{% endhighlight %}
76+
4. run a tunnel app if your site can't be accessed from Internet
3177

32-
### Status
78+
#### BrowserStack
3379

34-
* Maintainer: **davert**
35-
* Stability: **stable**
36-
* Contact: davert.codecept@mailican.com
37-
* Based on [facebook php-webdriver](https://github.com/facebook/php-webdriver)
80+
1. Create an account at [BrowserStack](https://www.browserstack.com/) to get your username and access key
81+
2. In the module configuration use the format `username`:`access_key`@ondemand.saucelabs.com' for `host`
82+
3. Configure `platform` under `capabilities` to define the [Operating System](https://docs.saucelabs.com/reference/platforms-configurator/#/)
3883

84+
{% highlight yaml %}
85+
86+
modules:
87+
enabled:
88+
- WebDriver:
89+
url: http://mysite.com
90+
host: '<username>:<access key>@hub.browserstack.com'
91+
port: 80
92+
browser: chrome
93+
capabilities:
94+
os: Windows
95+
os_version: 10
96+
browserstack.local: true # for local testing
97+
98+
{% endhighlight %}
99+
4. run a tunnel app if your site can't be accessed from Internet. In this case ensure that `browserstack.local` capability is set to true.
39100

40101
### Configuration
41102

@@ -54,7 +115,7 @@ You will need to set a browser name to `phantom` in configuration.
54115
* `http_proxy_port` - sets http proxy server port
55116
* `debug_log_entries` - how many selenium entries to print with `debugWebDriverLogs` or on fail (15 by default).
56117

57-
#### Example (`acceptance.suite.yml`)
118+
Example (`acceptance.suite.yml`)
58119

59120
modules:
60121
enabled:
@@ -64,31 +125,16 @@ You will need to set a browser name to `phantom` in configuration.
64125
window_size: 1024x768
65126
capabilities:
66127
unexpectedAlertBehaviour: 'accept'
67-
firefox_profile: '/Users/paul/Library/Application Support/Firefox/Profiles/codeception-profile.zip.b64'
128+
firefox_profile: '~/firefox-profiles/codeception-profile.zip.b64'
68129

130+
#### Status
69131

70-
#### PhantomJS Example (`acceptance.suite.yml`)
71-
72-
modules:
73-
enabled:
74-
- WebDriver:
75-
url: 'http://localhost/'
76-
browser: phantomjs
77-
78-
79-
### SauceLabs.com Integration
80-
81-
SauceLabs can run your WebDriver tests in the cloud, you can also create a tunnel
82-
enabling you to test locally hosted sites from their servers.
83-
84-
1. Create an account at [SauceLabs.com](http://SauceLabs.com) to get your username and access key
85-
2. In the module configuration use the format `username`:`access_key`@ondemand.saucelabs.com' for `host`
86-
3. Configure `platform` under `capabilities` to define the [Operating System](https://docs.saucelabs.com/reference/platforms-configurator/#/)
87-
88-
[CodeCeption and SauceLabs example](https://github.com/Codeception/Codeception/issues/657#issuecomment-28122164)
132+
Stability: **stable**
133+
Based on [facebook php-webdriver](https://github.com/facebook/php-webdriver)
89134

135+
### Usage
90136

91-
### Locating Elements
137+
#### Locating Elements
92138

93139
Most methods in this module that operate on a DOM element (e.g. `click`) accept a locator as the first argument, which can be either a string or an array.
94140

docs/reference/Commands.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ Starting from Codeception 2.0 actor classes are auto-generated. Use this command
123123
Creates empty Helper class.
124124

125125
* `codecept g:helper MyHelper`
126-
* `codecept g:helper "My\Helper"`
127126

128127

129128

docs/reference/JsonType.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ Example:
5555
{% highlight php %}
5656

5757
<?php
58-
JsonType::addCustomFilter('slug', function($value) {
59-
return strpos(' ', $value) !== false;
58+
JsonType::addCustomFilter('email', function($value) {
59+
return strpos(' * `',` $value) !== false;
6060
});
61-
// => use it as 'string:slug'
61+
// => use it as 'string:email'
6262

6363

6464
// add custom function to matcher with `len($val)` syntax

docs/reference/Stub.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $user->getName();
3030

3131
* `return` StubMarshaler
3232

33-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L666)
33+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L663)
3434

3535
#### *public static* consecutive()
3636

@@ -50,7 +50,7 @@ $user->getName(); //amy
5050

5151
* `return` ConsecutiveMap
5252

53-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L729)
53+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L726)
5454

5555
#### *public static* construct($class, $constructorParams = null, $params = null, $testCase = null)
5656

@@ -96,7 +96,7 @@ Stub::construct('User', array(), array('save' => true }));
9696

9797
* `return` object
9898

99-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L282)
99+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L279)
100100

101101
#### *public static* constructEmpty($class, $constructorParams = null, $params = null, $testCase = null)
102102

@@ -142,7 +142,7 @@ Stub::constructEmpty('User', array(), array('save' => true }));
142142

143143
* `return` object
144144

145-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L333)
145+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L330)
146146

147147
#### *public static* constructEmptyExcept($class, $method, $constructorParams = null, $params = null, $testCase = null)
148148

@@ -189,7 +189,7 @@ Stub::constructEmptyExcept('User', 'save', array(), array('save' => true }));
189189

190190
* `return` object
191191

192-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L389)
192+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L386)
193193

194194
#### *public static* copy($obj, $params = null)
195195

@@ -200,7 +200,7 @@ Clones an object and redefines it's properties (even protected and private)
200200

201201
* `return` mixed
202202

203-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L237)
203+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L234)
204204

205205
#### *public static* exactly($count, $params = null)
206206

@@ -227,7 +227,7 @@ $user->getName();
227227

228228
* `return` StubMarshaler
229229

230-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L696)
230+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L693)
231231

232232
#### *public static* factory($class, $num = null, $params = null)
233233

@@ -239,7 +239,7 @@ Creates $num instances of class through `Stub::make`.
239239

240240
* `return` array
241241

242-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L93)
242+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L90)
243243

244244
#### *public static* make($class, $params = null, $testCase = null)
245245

@@ -329,7 +329,7 @@ Stub::makeEmpty('User', array('save' => true }));
329329

330330
* `return` object
331331

332-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L211)
332+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L208)
333333

334334
#### *public static* makeEmptyExcept($class, $method, $params = null, $testCase = null)
335335

@@ -375,7 +375,7 @@ Stub::makeEmptyExcept('User', 'save', array('isValid' => true }));
375375

376376
* `return` object
377377

378-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L140)
378+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L137)
379379

380380
#### *public static* never($params = null)
381381

@@ -397,7 +397,7 @@ $user->someMethod();
397397

398398
* `return` StubMarshaler
399399

400-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L613)
400+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L610)
401401

402402
#### *public static* once($params = null)
403403

@@ -421,7 +421,7 @@ $this->assertEquals('Davert', $userName);
421421

422422
* `return` StubMarshaler
423423

424-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L640)
424+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L637)
425425

426426
#### *public static* update($mock, array $params)
427427

@@ -433,6 +433,6 @@ Replaces properties of current stub
433433
* `return` mixed
434434
* `throws` \LogicException
435435

436-
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L482)
436+
[See source](https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php#L479)
437437

438438
<p>&nbsp;</p><div class="alert alert-warning">Reference is taken from the source code. <a href="https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Util/Stub.php">Help us to improve documentation. Edit module reference</a></div>

docs/reference/XmlBuilder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $xml->users
2727
->attr('empty','false')
2828
->items
2929
->item
30-
->val('useful item');
30+
->val('useful item')
3131
->parents('user')
3232
->active
3333
->val(1);

0 commit comments

Comments
 (0)