Skip to content

Custom NightwatchJS command for file upload using remote selenium grid

Notifications You must be signed in to change notification settings

RohanImmanuel/NightwatchJS-Remote-File-Upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

NightwatchJS-Remote-File-Upload

Custom NightwatchJS command for file upload using remote selenium grid

Dependencies

This works only for NightwatchJS v1.4+

This project requires adm-zip

npm i adm-zip

Installation

  1. Place the folder customCommands in the root of your project
  2. Update NightwatchJ Config:
  custom_commands_path: ["customCommands"],

Sample Test

module.exports = {
  'File Upload Test' : function (browser) {
    browser
      .url('https://the-internet.herokuapp.com/upload')
      .UploadLocalFile("/path_to_file/testfile.txt", "#file-upload")
      .click('#file-submit')
      .pause(10000)
      .end();
  }
};

About

Custom NightwatchJS command for file upload using remote selenium grid

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published