https://github.com/testxio/testx-file-keywords
A library that extends testx with keywords for content of text files. This library is packaged as a npm package.
https://github.com/testxio/testx-file-keywords
Last synced: 8 months ago
JSON representation
A library that extends testx with keywords for content of text files. This library is packaged as a npm package.
- Host: GitHub
- URL: https://github.com/testxio/testx-file-keywords
- Owner: testxio
- Created: 2015-09-21T09:47:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-21T13:17:15.000Z (over 10 years ago)
- Last Synced: 2025-08-20T09:35:46.771Z (9 months ago)
- Language: CoffeeScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
testx-file-keywords
=====
A library that extends testx with keywords for content of text files. This library is packaged as a npm package.
## How does it work
From the directory of the art code install the package as follows:
```sh
npm install testx-file-keywords --save
```
After installing the package add the keywords to your protractor config file as follows:
for testx 0.x
```
testx.addKeywords(require('testx-file-keywords'))
```
for testx 1.x
```
testx.keywords.add(require('testx-file-keywords'))
```
## Keywords
| Keyword | Argument name | Argument value | Description | Supports repeating arguments |
| ---------------------- | ------------- | --------------- |------------ | ---------------------------- |
| check text in file | | | check that the expected regex matches the text in the (text) file | |
| | file | full path to the file |one of **file**, **url** or **link** has to be specified| No |
| | url | URL of the file |one of **file**, **url** or **link** has to be specified| No |
| | link | link to the pdf file |one of **file**, **url** or **link** has to be specified| No |
| | timeout | timeout in milliseconds to wait for the link to the file to appear on the screen; ignored if the keyword is used with **file** or **url**; parameters; defaults to 5000 if not present || No |
| | expect1(2, 3...) | expected regular expression to match the text in the file || Yes |
| check text not in file | | | same as **check text in file**, but checks that the specified regex DOES NOT match | |
| check in pdf | | | check that the expected regex matches the text in the PDF file | |
| | file | full path to the pdf file; one of **file**, **url** or **link** has to be specified || No |
| | url | URL of the pdf file; one of **file**, **url** or **link** has to be specified || No |
| | link | link to the pdf file; one of **file**, **url** or **link** has to be specified || No |
| | timeout | timeout in milliseconds to wait for the link to the PDF to appear on the screen; ignored if the keyword is used with **file** or **url**; parameters; defaults to 5000 if not present || No |
| | expect1(2, 3...) | expected regular expression to match the text in the pdf || Yes |
| check not in pdf | | | same as **check in pdf**, but checks that the specified regex DOES NOT match | |
| check text in pdf | | | alias for **check in pdf** ||
| check text not in pdf | | | alias for **check not in pdf** |||