承接 turgutsaricam/webdriver-tools 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

turgutsaricam/webdriver-tools

Composer 安装命令:

composer require turgutsaricam/webdriver-tools

包简介

General-purpose classes for facebook/webdriver

README 文档

README

This repository contains general-purpose classes that are commonly needed when working with facebook/webdriver, when running Selenium tests for PHP.

WebDriver Package

This package requires facebook/webdriver. Basically, this should be used for Selenium tests. This package provides an AbstractDriverManager that handles loading different URLs in different tabs, switching to a tab if a URL is already loaded in a tab, adding a parameter for each URL to hint code coverage (the same hint explained in CoverageHandler), modifying window.ajaxurl JavaScript variable (which is the default variable for WordPress sites) to enable code coverage for AJAX requests, closing excessive browser tabs, setting up the driver and logging into the site-under-test, and other things like refreshing, closing, opening tabs.

To use this package, create a class that extends AbstractDriverManager, implement the required methods (or use DefaultDriverManager). AbstractDriverManager requires an AbstractSetupStrategy that will setup the driver and login to the site. To provide a strategy, simply create a class and extend it to AbstractSetupStrategy, and implement the required methods. The package comes with WordPressSetupStrategy. If you are testing a WordPress site, you can directly use it.

In your tests, instead of using the webdriver directly, perform every driver action through an AbstractDriverManager. Otherwise, there is no point using a driver manager.

Development

To test this project, include it in another project using a local repository by defining the following in that other project's composer.json:

{
  "repositories": [
        {
            "type": "path",
            "url": "path/to/local/directory/of/webdriver-tools",
            "options": {
                "symlink": false
            }
        }
    ],
}

After this, delete vendor/turgutsaricam/webdriver-tools directory from that other project's vendor directory, optionally set the version of turgutsaricam/webdriver-tools under require(-dev) item of composer.json to @dev, and then run composer update turgutsaricam/webdriver-tools. This will copy the files in the local development repository to that other project's vendor directory. By this way, the changes can be tested prior to committing the changes to git.

TODO

  • Write tests

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-07-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固