{"id":19783115,"url":"https://github.com/edmondscommerce/behat-html-context","last_synced_at":"2025-10-05T22:45:11.728Z","repository":{"id":56975142,"uuid":"50105258","full_name":"edmondscommerce/behat-html-context","owner":"edmondscommerce","description":"Behat HTML Context","archived":false,"fork":false,"pushed_at":"2019-11-08T14:20:23.000Z","size":72,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-23T08:52:54.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edmondscommerce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-21T12:11:58.000Z","updated_at":"2020-01-21T15:45:07.000Z","dependencies_parsed_at":"2022-08-21T11:50:53.693Z","dependency_job_id":null,"html_url":"https://github.com/edmondscommerce/behat-html-context","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/edmondscommerce/behat-html-context","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fbehat-html-context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fbehat-html-context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fbehat-html-context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fbehat-html-context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edmondscommerce","download_url":"https://codeload.github.com/edmondscommerce/behat-html-context/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondscommerce%2Fbehat-html-context/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278532356,"owners_count":26002345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T06:07:20.579Z","updated_at":"2025-10-05T22:45:11.700Z","avatar_url":"https://github.com/edmondscommerce.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Behat HTML Context\n## By [Edmonds Commerce](https://www.edmondscommerce.co.uk)\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e2a47b219c934d3c93e15f5aaa451857)](https://www.codacy.com/app/edmondscommerce/behat-html-context?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=edmondscommerce/behat-html-context\u0026amp;utm_campaign=Badge_Grade)\n\nA simple Behat Context for working with HTML and navigation\n\n### Installation\n\nInstall via composer\n\n    \"edmondscommerce/behat-html-context\": \"0.0.1\"\n\n### Include Context in Behat Configuration\n        \n    default:\n        # ...\n        suites:\n            default:\n                # ...\n                contexts:\n                    - # ...\n                    - EdmondsCommerce\\BehatHtmlContext\\HTMLContext\n                    - EdmondsCommerce\\BehatHtmlContext\\RedirectionContext\n                    \n\n\u003e    `EdmondsCommerce\\BehatHtmlContext\\RedirectionContext` is no longer supported and marked as deprecated.\n                    \n## Helper Methods\nYou will need to load the HTML context as part of your own suite of contexts using `@BeforeScenario` to access the helper methods\n\nAll helpers accept a custom message to use with the exception \n```php\n\n// Instantiate context class, \n$args = [\n    'args' =\u003e [\n        '--disable-gpu',\n        '--window-size=1920,1080',\n        '--start-maximised',\n    ],\n];\n\n$driver = new Selenium2Driver('chrome', $args);\n$session = new Behat\\Mink\\Session($driver);\n$mink = new Mink(['selenium2' =\u003e $session]);\n\n$htmlContext = new HTMLContext();\n$htmlContext-\u003esetMink($mink);\n\n//Find a node and return it or throw an exception\n$htmlContext-\u003efindOneOrFail($selector, $locator, $message = null)\n\n//Find multiple nodes and return an array of them or throw an exception if none are found\n$htmlContext-\u003efindAllOrFail($selector, $locator, $message = null)\n\n//Same as findOrFail but searches from the context of another node, can be useful for chaining\n$htmlContext-\u003efindOrFailFromNode(\\Behat\\Mink\\Element\\NodeElement $element, $selector, $locator, $message = null)\n```\n\n## Developer dependencies\n\n### edmondscommerce/phpqa\n\nSimple PHP QA pipeline and scripts, that helps achieving high quality of code. [Click here](https://github.com/edmondscommerce/phpqa) for more details.\n\n### edmondscommerce/mock-server\n\nPHP Built-in web server. [Click here](https://github.com/edmondscommerce/mock-server) for more details.\n\n### behat/mink-goutte-driver\n\nGoutte driver. [Click here](https://github.com/minkphp/MinkGoutteDriver) for more details.\n\n### behat/mink-selenium2-driver\n\nSelenium2 driver. [Click here](https://github.com/minkphp/MinkSelenium2Driver) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedmondscommerce%2Fbehat-html-context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedmondscommerce%2Fbehat-html-context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedmondscommerce%2Fbehat-html-context/lists"}