elstc/codeception-mobileemulation 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

elstc/codeception-mobileemulation

最新稳定版本:v1.0.0

Composer 安装命令:

composer require elstc/codeception-mobileemulation

包简介

WebDriver mobile emulation switcher for Codeception

README 文档

README

Software License Build Status Latest Stable Version

This Codeception module can be able mobile emulation on browser. Currently support only chrome browser.

Installation

You can install this plugin into your applicaion using composer.

The recommended way to install composer packages is:

composer require --dev elstc/codeception-mobileemulation

Then enable this module in your test suite configration file (eg: acceptance.suite.yml and etc...):

modules:
    enabled:
        - MobileEmulation
        - WebDriver

See: 06-ModulesAndHelpers - Codeception - Documentation

[IMPORTANT] MobileEmulation module should be load before WebDriver module.

Usage

In your Cest test case, write $mobileEmulation property:

class AwesomeCest
{
    public $mobileEmulation = true;

    // ...
}

When $mobileEmulation = true, within this testcase, mobile emulation is enabled.

And you can use emulationMobile() method:

class AwesomeCest
{
    public function tryYourSenario($I)
    {
        // enable mobile emulation manually, (with specific device name)
        $I->emulationMobile('iPhone 8 Plus');
        // ...
    }
}

Configuration options

defaultDeviceName

Default emulate device name.

default: 'iPhone 6'

统计信息

  • 总下载量: 58.03k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-19