hyperia/highlight-ception

为 Codeception 高亮文本或元素。

1.3.0 2017-09-26 13:03 UTC

This package is not auto-updated.

Last update: 2024-09-15 03:29:16 UTC


README

Build Status GitHub license Latest Stable Version

此模块可用于显示网站上期望的当前表示的 css元素文本xpath。它是在 codeception 的基础上编写的,并且可以非常容易地集成。

screenshot from 2017-08-13 15-20-53

安装

安装此扩展的首选方式是通过 composer

运行以下命令

composer require hyperia/highlight-ception:"^1.1"

或者

"hyperia/highlight-ception": "^1.1"

将以下内容添加到 composer.json 的 require 部分。

配置(使用方法)

acceptance.suite.yml 配置文件中启用 HighlightCeption 模块

modules:
    enabled:
        - WebDriver:
            url: http://hyperia.sk
            browser: chrome
        - HighlightCeption:
            module: WebDriver
            timeWait: 2
            cssClassName: 'hyperia-hc'
            cssStyle:
                background-color: yellow
                color: black

参数描述

  • module - 负责浏览器交互的模块,默认:WebDriver。
  • timeWait - seeseeLinkseeElementsseeInFieldclickclickWithLeftButtonclickWithRightButton 函数之间的等待秒数
  • cssClassName - 要用于注入页面中的 css 样式的 css 类名
  • cssStyle - 用于在网站上高亮显示元素或文本的自定义 css 样式

需求

HighlightCeption 运行需要以下组件

  • Codeception HighlightCeption 是 Codeception 的模块。它需要一个运行的版本。
  • WebDriver 模块 目前此工具仅与 Codeception 的 WebDriver 模块一起使用。

测试

./vendor/bin/codecept run -- -c test/integration