edmondscommerce/behat-html-context
Composer 安装命令:
composer require --dev edmondscommerce/behat-html-context
包简介
A Behat Extension for HTML
README 文档
README
By Edmonds Commerce
A simple Behat Context for working with HTML and navigation
Installation
Install via composer
"edmondscommerce/behat-html-context": "0.0.1"
Include Context in Behat Configuration
default:
# ...
suites:
default:
# ...
contexts:
- # ...
- EdmondsCommerce\BehatHtmlContext\HTMLContext
- EdmondsCommerce\BehatHtmlContext\RedirectionContext
EdmondsCommerce\BehatHtmlContext\RedirectionContextis no longer supported and marked as deprecated.
Helper Methods
You will need to load the HTML context as part of your own suite of contexts using @BeforeScenario to access the helper methods
All helpers accept a custom message to use with the exception
// Instantiate context class, $args = [ 'args' => [ '--disable-gpu', '--window-size=1920,1080', '--start-maximised', ], ]; $driver = new Selenium2Driver('chrome', $args); $session = new Behat\Mink\Session($driver); $mink = new Mink(['selenium2' => $session]); $htmlContext = new HTMLContext(); $htmlContext->setMink($mink); //Find a node and return it or throw an exception $htmlContext->findOneOrFail($selector, $locator, $message = null) //Find multiple nodes and return an array of them or throw an exception if none are found $htmlContext->findAllOrFail($selector, $locator, $message = null) //Same as findOrFail but searches from the context of another node, can be useful for chaining $htmlContext->findOrFailFromNode(\Behat\Mink\Element\NodeElement $element, $selector, $locator, $message = null)
Developer dependencies
edmondscommerce/phpqa
Simple PHP QA pipeline and scripts, that helps achieving high quality of code. Click here for more details.
edmondscommerce/mock-server
PHP Built-in web server. Click here for more details.
behat/mink-goutte-driver
Goutte driver. Click here for more details.
behat/mink-selenium2-driver
Selenium2 driver. Click here for more details.
edmondscommerce/behat-html-context 适用场景与选型建议
edmondscommerce/behat-html-context 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 583 次下载、GitHub Stars 达 4, 最近一次更新时间为 2016 年 01 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「logging」 「testing」 「Behat」 「browser」 「html」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 edmondscommerce/behat-html-context 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 edmondscommerce/behat-html-context 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 edmondscommerce/behat-html-context 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Behat Context for testing Symfony Api
A Behat Extension that allows custom bootstrapping
Environment processor and contexts autoloader
Provides access to magento2 object manager from behat and allows to change magento config settings temporarly
Testing Suite For Lumen like Laravel does.
log the behat execution into json result
统计信息
- 总下载量: 583
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-01-21