Module for handling remote files in codeception
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
AttachFileRemoteHelper.php
readme.md

readme.md

Codeception Remote File Attachment Helper

This module helps to upload files when using webdriver via remote connection when using codeception.

Getting started

Bootstrap

Just copy the file to your project and add it to your bootstrap file:

include_once "/path/to/module/AttachFileRemoteHelper.php";

Configuration

After editing your bootstrap file you have to update your test suite configuration

modules:
    enabled: [WebDriver, AttachFileRemoteHelper]

No additional configuration has to be made. Just add the AttachFileRemoteHelper.

Building the WebGuy

After changing your configuration you have to re-build the web guy.

php codecept.phar build

Usage

Once the module is actived you are able to use the new method attachFileRemote the same way you are using the native codeception/webdriver method attachFile.

<?php

class CreateCommentCest
{
    public function testRemoteFileUpload (WebGuy $I, $scenario)
    {
        $I->amOnPage("/html/formulare/anzeige/input_file.htm");
        $I->attachFileRemote("Datei", "image.png");
    }
}