Download the PHP package devchid/wpselenium without Composer

On this page you can find all versions of the php package devchid/wpselenium. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wpselenium

WPSelenium

WPSelenium is a library that allows you to quickly get up and running testing your site with selenium and phpunit.

WPSelenium is a library that quickly gets you up and running when you want to test your site using selenium and phpunit. It does this by installing and configuring phpunit, the selenium server, the php client webdriver (by facebook) and the correct drivers for the browser you want to test on. Once installed all you have to worry about is writing your selenium php tests.

WPSelenium also includes support for testing WordPress plugins and themes. It does this by providing WordPress specific hooks and configuration end points you can use.

Usage

Getting Started

Requirements

In order to run WPSelenium you will need to have the following installed

1. Install

To get started with WPselenium install it using composer using the following command:-

composer require --dev devchid/wpselenium

Note:- This command assumes that the working directory you are running it from is a composer project. If not, you can easily make it one buy running composer init or adding a composer.json file.

Note:- WPSelnenium curently downloads the 76.0.3809.126 chrome drivers and the 0.24 firefox gecko drivers. If your browser needs a newer or older vesion of a driver (you will get error suggesting this if unsure) please specify an updated download url for the driver in the wpselenium.xml config file. Please see the documentation site for more details.

2. Configure

Having installed wpselenium you need to create a wpselenium.xml config file. This file should be in the same location as you composer.json file. Below if a very basic sample configuration to get you going.

You will need to replace siteUrl, with you own site you are trying to test.

Note:- The WPSelenium.xml can embed the phpunit config, using the phpunit endpoint (like above). This specified config is then loaded when testing your project with phpunit. However if you want to create your own phpunit config file (phpunit.xml) you can also do this (and not include it here). See documentation site for more details.

3. Run Tests

After this previous step you are in essence done. You can run the following command from the same location as your composer.json file (were browser_driver can either be chrome or firefox)

/vendor/bin/wpselenium [brower_driver]

If everything was configured properly you should see a browser window opened up to your site's home page (Example below). This window will close after about 10s .

example_login

Note:-

  1. On first run WPSelenium will download the required files and configure those appropriately. This means your first run will take a little bit long to start testing your site.
  2. WPSelenium currently comes with only support for chrome and firefox. However if there is another browser you want to test you can specify the link to the browser drivers in you wpselenium config. From there you can rerun the above command using the specified name of your driver (I.e /vendor/bin/wpselenium opera). See Configuration section for more details.

If you managed to see the home page of your site like the above example, everything is set up correct. You can now go ahead and write your tests.

WordPress Support

WPSelenium comes with inbuilt support for WordPress sites. This is particularly useful when building custom plugins or themes that might require UI testing. Please see documentation site for more details.

Documentation

The WPSelenium library is fully documented at https://wpselenium.centridsol.tech/. If you think of anything else that should be documented that's not there, please do give a shout.

Contributing

WPSelenium is an opensource project and contributions are valued.

If you are contributing a bug fix, please create a pull request with the following details

If it's a new feature, please add it as a issue with the label enhancement, detailing the new feature and why you think it's needed. Will discuss it there and once it's agreed upon you can create a pull request with the details highlighted above.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details


All versions of wpselenium with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
phpunit/phpunit Version 7.4.5
facebook/webdriver Version ^1.0
ulrichsg/getopt-php Version ^3.2
ext-curl Version *
limedeck/phpunit-detailed-printer Version 4.2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package devchid/wpselenium contains the following files

Loading the files please wait ....