|
75 | 75 | * selenium-standalone start |
76 | 76 | * ``` |
77 | 77 | * |
78 | | - * Update configuration in `acceptance.suite.yml`: |
| 78 | + * Update configuration in `Acceptance.suite.yml`: |
79 | 79 | * |
80 | 80 | * ```yaml |
81 | 81 | * modules: |
|
87 | 87 | * |
88 | 88 | * ## Headless Chrome Browser |
89 | 89 | * |
90 | | - * To enable headless mode (launch tests without showing a window) for Chrome browser using Selenium use this config in `acceptance.suite.yml`: |
| 90 | + * To enable headless mode (launch tests without showing a window) for Chrome browser using Selenium use this config in `Acceptance.suite.yml`: |
91 | 91 | * |
92 | 92 | * ```yaml |
93 | 93 | * modules: |
|
120 | 120 | * * Download and install [ChromeDriver](https://sites.google.com/chromium.org/driver/downloads?authuser=0) |
121 | 121 | * * Launch ChromeDriver in a separate console window: `chromedriver --url-base=/wd/hub`. |
122 | 122 | * |
123 | | - * Configuration in `acceptance.suite.yml`: |
| 123 | + * Configuration in `Acceptance.suite.yml`: |
124 | 124 | * |
125 | 125 | * ```yaml |
126 | 126 | * modules: |
|
144 | 144 | * * [GeckoDriver](https://github.com/mozilla/geckodriver/releases) must be installed |
145 | 145 | * * Start GeckoDriver in a separate console window: `geckodriver`. |
146 | 146 | * |
147 | | - * Configuration in `acceptance.suite.yml`: |
| 147 | + * Configuration in `Acceptance.suite.yml`: |
148 | 148 | * |
149 | 149 | * ```yaml |
150 | 150 | * modules: |
|
196 | 196 | * 4. If your site is available only locally or via VPN you should use a tunnel app. In this case add `browserstack.local` capability and set it to true. |
197 | 197 | * |
198 | 198 | * ```yaml |
199 | | - * modules: |
200 | | - * enabled: |
201 | | - * - WebDriver: |
| 199 | + * modules: |
| 200 | + * enabled: |
| 201 | + * - WebDriver: |
202 | 202 | * url: http://mysite.com |
203 | 203 | * host: '<username>:<access key>@hub.browserstack.com' |
204 | 204 | * port: 80 |
|
218 | 218 | * 4. If your website is available only locally or via VPN you should use LambdaTest tunnel. In this case, you can add capability "tunnel":true;. |
219 | 219 | * |
220 | 220 | * ```yaml |
221 | | - * modules: |
222 | | - * enabled: |
223 | | - * - WebDriver: |
224 | | - url: "https://openclassrooms.com" |
225 | | - host: 'hub.lambdatest.com' |
226 | | - port: 80 |
227 | | - browser: 'Chrome' |
228 | | - capabilities: |
229 | | - LT:Options: |
230 | | - platformName: 'Windows 10' |
231 | | - browserVersion: 'latest-5' |
232 | | - browserName: 'Chrome' |
233 | | - tunnel: true #for Local testing |
| 221 | + * modules: |
| 222 | + * enabled: |
| 223 | + * - WebDriver: |
| 224 | + url: "https://openclassrooms.com" |
| 225 | + host: 'hub.lambdatest.com' |
| 226 | + port: 80 |
| 227 | + browser: 'Chrome' |
| 228 | + capabilities: |
| 229 | + LT:Options: |
| 230 | + platformName: 'Windows 10' |
| 231 | + browserVersion: 'latest-5' |
| 232 | + browserName: 'Chrome' |
| 233 | + tunnel: true #for Local testing |
234 | 234 | * ``` |
235 | 235 | * |
236 | 236 | * ### TestingBot |
|
241 | 241 | * 4. Run [TestingBot Tunnel](https://testingbot.com/support/other/tunnel) if your site can't be accessed from Internet |
242 | 242 | * |
243 | 243 | * ```yaml |
244 | | - * modules: |
245 | | - * enabled: |
246 | | - * - WebDriver: |
247 | | - * url: http://mysite.com |
248 | | - * host: '<key>:<secret>@hub.testingbot.com' |
249 | | - * port: 80 |
250 | | - * browser: chrome |
251 | | - * capabilities: |
252 | | - * platformName: Windows 10 |
| 244 | + * modules: |
| 245 | + * enabled: |
| 246 | + * - WebDriver: |
| 247 | + * url: http://mysite.com |
| 248 | + * host: '<key>:<secret>@hub.testingbot.com' |
| 249 | + * port: 80 |
| 250 | + * browser: chrome |
| 251 | + * capabilities: |
| 252 | + * platformName: Windows 10 |
253 | 253 | * ``` |
254 | 254 | * |
255 | 255 | * ## Configuration |
|
276 | 276 | * * `webdriver_proxy` - sets http proxy to tunnel requests to the remote Selenium WebDriver through |
277 | 277 | * * `webdriver_proxy_port` - sets http proxy server port to tunnel requests to the remote Selenium WebDriver through |
278 | 278 | * |
279 | | - * Example (`acceptance.suite.yml`) |
| 279 | + * Example (`Acceptance.suite.yml`) |
280 | 280 | * |
281 | 281 | * ```yaml |
282 | | - * modules: |
283 | | - * enabled: |
284 | | - * - WebDriver: |
285 | | - * url: 'http://localhost/' |
286 | | - * browser: firefox |
287 | | - * window_size: 1024x768 |
288 | | - * capabilities: |
289 | | - * unhandledPromptBehaviour: 'accept' |
290 | | - * moz:firefoxOptions: |
291 | | - * profile: '~/firefox-profiles/codeception-profile.zip.b64' |
| 282 | + * modules: |
| 283 | + * enabled: |
| 284 | + * - WebDriver: |
| 285 | + * url: 'http://localhost/' |
| 286 | + * browser: firefox |
| 287 | + * window_size: 1024x768 |
| 288 | + * capabilities: |
| 289 | + * unhandledPromptBehaviour: 'accept' |
| 290 | + * moz:firefoxOptions: |
| 291 | + * profile: '~/firefox-profiles/codeception-profile.zip.b64' |
292 | 292 | * ``` |
293 | 293 | * |
294 | 294 | * ## Loading Parts from other Modules |
|
356 | 356 | * |
357 | 357 | * You can inject `\Codeception\Scenario` into your test to get information about the current configuration: |
358 | 358 | * ```php |
359 | | - * use Codeception\Scenario |
| 359 | + * use Codeception\Scenario; |
| 360 | + * |
360 | 361 | * public function myTest(AcceptanceTester $I, Scenario $scenario) |
361 | 362 | * { |
362 | 363 | * if ('firefox' === $scenario->current('browser')) { |
@@ -522,7 +523,8 @@ public function _initialize() |
522 | 523 | * This is how it can be done via `_capabilities` method from `Helper\Acceptance`: |
523 | 524 | * |
524 | 525 | * ```php |
525 | | - * <?php // inside Helper\Acceptance |
| 526 | + * <?php |
| 527 | + * // inside Helper\Acceptance |
526 | 528 | * public function _before(TestInterface $test) |
527 | 529 | * { |
528 | 530 | * $name = $test->getMetadata()->getName(); |
|
0 commit comments