### Install Mink Drivers Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Installs the required Mink drivers for Behat using Composer. These drivers enable different browser interaction capabilities. ```bash composer require behat/mink-goutte-driver composer require behat/mink-selenium-driver composer require behat/mink-selenium2-driver composer require behat/mink-sahi-driver composer require behat/mink-zombie-driver ``` -------------------------------- ### Install Mink Extension with Composer Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Installs the Behat Mink Extension using Composer, the dependency manager for PHP. This is the recommended way to keep the extension updated. ```bash composer require --dev behat/mink-extension ``` -------------------------------- ### Extend MinkContext for Custom Steps Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Demonstrates extending the Behat\MinkExtension\Context\MinkContext class to add custom step definitions. This example shows how to wait for an element to appear on the page using JavaScript. ```php getSession()->wait(5000, "$('.suggestions-results').children().length > 0"); } } ``` -------------------------------- ### Configure BrowserStackDriver in behat.yml Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Enables the BrowserStackDriver, a specialized Selenium2Driver for using the browserstack.com hosted Selenium installation. This configuration is added within the MinkExtension sessions. ```yaml default: extensions: Behat\MinkExtension: sessions: my_session: browser_stack: ~ ``` -------------------------------- ### Configure SauceLabsDriver in behat.yml Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Enables the SauceLabsDriver, a specialized Selenium2Driver for using the saucelabs.com hosted Selenium installation. This configuration is added within the MinkExtension sessions. ```yaml default: extensions: Behat\MinkExtension: sessions: my_session: sauce_labs: ~ ``` -------------------------------- ### MinkExtension Features Source: https://github.com/behat/minkextension/blob/master/README.md MinkExtension provides essential services for Behat integration with Mink, including Mink, Sessions, and Drivers. It also offers a MinkAwareContext for accessing Mink instances and a base MinkContext with predefined step definitions. ```php MinkExtension provides: * Additional services for Behat (``Mink``, ``Sessions``, ``Drivers``). * ``Behat\MinkExtension\Context\MinkAwareContext`` which provides ``Mink`` instance for your contexts. * Base ``Behat\MinkExtension\Context\MinkContext`` context which provides base step definitions and hooks for your contexts or subcontexts. ``` -------------------------------- ### Configure Multiple Mink Sessions Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Shows how to configure multiple Mink sessions with different drivers within the behat.yml file. This allows switching between drivers like Selenium2 and Goutte for different testing needs. ```yaml default: extensions: Behat\MinkExtension: sessions: first_session: selenium2: ~ second_session: goutte: ~ third_session: ``` -------------------------------- ### MinkExtension Suite Configuration Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Configuration options for Behat MinkExtension suites. These parameters allow customization of base URLs, file paths, debugging commands, and session management. ```yaml default: suites: default: contexts: - Mink extensions: Behat\MinkExtension: base_url: "http://example.com" files_path: "/path/to/files" show_cmd: "firefox %s" show_tmp_dir: "/tmp" show_auto: true browser_name: "chrome" default_session: "default" javascript_session: "javascript" mink_loader: "/path/to/mink/loader.php" ``` -------------------------------- ### Configure Mink Extension in behat.yml Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Activates the Mink Extension by specifying its class in the behat.yml configuration file. It also sets a base URL and configures a default session using the Goutte driver. ```yaml default: # ... extensions: Behat\MinkExtension: base_url: 'http://example.com' sessions: default: goutte: ~ ``` -------------------------------- ### Configure ZombieDriver in behat.yml Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Enables the ZombieDriver, a headless JavaScript driver using zombie.js. Requires specifying the path to the node_modules directory. ```yaml default: extensions: Behat\MinkExtension: sessions: default: zombie: # Specify the path to the node_modules directory. node_modules_path: /usr/local/lib/node_modules/ ``` -------------------------------- ### Add MinkContext as a Suite Context Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Configures behat.yml to include Behat\MinkExtension\Context\MinkContext as a context for a specific suite. This allows using predefined step definitions without inheriting directly into the main FeatureContext. ```yaml default: suites: my_suite: contexts: - FeatureContext - Behat\MinkExtension\Context\MinkContext ``` -------------------------------- ### Configure SahiDriver in behat.yml Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Enables the SahiDriver for JavaScript-enabled browser testing. This configuration is added within the MinkExtension sessions. ```yaml default: extensions: Behat\MinkExtension: sessions: my_session: sahi: ~ ``` -------------------------------- ### Configure Default Sessions in behat.yml Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Sets the default Mink session and JavaScript session for a suite. The JavaScript session defaults to the first session with a JavaScript driver if not explicitly configured. ```yaml default: suites: first: mink_session: foo mink_javascript_session: sahi ``` -------------------------------- ### Configure GoutteDriver in behat.yml Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Enables the GoutteDriver for headless testing without JavaScript support. This configuration is added within the MinkExtension sessions. ```yaml default: extensions: Behat\MinkExtension: sessions: my_session: goutte: ~ ``` -------------------------------- ### Configure SeleniumDriver in behat.yml Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Enables the SeleniumDriver for JavaScript-enabled browser testing. This configuration is added within the MinkExtension sessions. ```yaml default: extensions: Behat\MinkExtension: sessions: my_session: selenium: ~ ``` -------------------------------- ### Configure Selenium2Driver in behat.yml Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Enables the Selenium2Driver for JavaScript-enabled browser testing. This configuration is added within the MinkExtension sessions. ```yaml default: extensions: Behat\MinkExtension: sessions: my_session: selenium2: ~ ``` -------------------------------- ### Adding Translated Languages Source: https://github.com/behat/minkextension/blob/master/README.md Instructions on how to add a new translated language for MinkExtension. It requires referencing existing language files and ensuring filename consistency with Behat and Gherkin. ```text To add a new translated language: 1. Use the `ru` language file in the `translations` folder as a reference. 2. Ensure the filename matches the translated language name in Behat and Gherkin. 3. If the language is not in Gherkin, consider contributing to Gherkin translations. ``` -------------------------------- ### Configure GoutteDriver with SSL Verification Disabled (Guzzle 3-) Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Disables SSL certificate verification for GoutteDriver when using Guzzle 3 or earlier, useful for testing HTTPS sites with self-signed certificates. ```yaml default: extensions: Behat\MinkExtension: sessions: my_session: goutte: guzzle_parameters: ssl.certificate_authority: false ``` -------------------------------- ### Configure GoutteDriver with SSL Verification Disabled (Guzzle 4+) Source: https://github.com/behat/minkextension/blob/master/doc/index.rst Disables SSL certificate verification for GoutteDriver when using Guzzle 4 or later, useful for testing HTTPS sites with self-signed certificates. ```yaml default: extensions: Behat\MinkExtension: sessions: my_session: goutte: guzzle_parameters: verify: false ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.