1.0.1 • Published 2 years ago
wdio-enverus-core-api-utils v1.0.1
WDIO Enverus Core API utils
About
The motivation with this module is to provide a high-level abstraction for Core API utils.
Getting Started
Install WDIO Enverus Core Api Utils
as an npm module and save it to your package.json file as a development dependency:
npm install wdio-enverus-core-api-utils --save-dev
Once installed it can now be referenced by simply calling
import {
FileUtils as fileUtils,
StringUtils as stringUtils,
Utils as utils
} from 'wdio-enverus-core-api-utils';
Available methods:
File Utils:
- downloadFile - Download File (via curl)
- extractArchive - Extract archive to path
- fileLineCount - Compare the number of line in file and table
- getDBFFileHeader - Get .dbf file header
- fileHeader - Get file header
- uploadFile - Upload file
- readTextFile - Read text file
- stringToArray - Convert string to array.
- getColumnDataFromFile - Get column rows value from file
- isFileExist - Check if file exist
- getFilesFromPath - Get files name from path
- writeFile - Write data to file
Method Summary
Methods | Methods type | Parameters |
---|---|---|
async downloadFile | public | directory: string , fileName: string , url: string |
async extractArchive | public | suiteName: string , fileName: string |
async fileLineCount | public | fileName: string , suiteName: string , remove: Nu,ber |
async getDBFFileHeader | public | fileName: string , suiteName: string |
async fileHeader | public | fileName: string , suiteName: string |
async uploadFile | public | fileName: string |
async readTextFile | public | fileName: string |
async stringToArray | public | string: string , separator: string , booleanRemoveLegend: boolean |
async getColumnDataFromFile | public | fileName: string , column: string |
async isFileExist | public | fileName: string , suiteName: string |
async getFilesFromPath | public | suiteName: string |
async writeFile | public | file_name: string , data: string , file_path: string |
String Utils:
- areArraysEqual - Compare if two string arrays are equal. Order of elements in arrays does not matter.
- stringToArray - Convert string to array.
Method Summary
Methods | Methods type | Parameters |
---|---|---|
async areArraysEqual | public | arr1: Object , arr2: Object |
async stringToArray | public | string: string , separator: string , booleanRemoveLegend: boolean |
Utils:
getUUid - Get Universal Unique Identifier
Method Summary
Methods | Methods type |
---|---|
async getUUid | public |