Skip to content

Commit 9167366

Browse files
author
John Doherty
committed
added -n switch to disable the capturing of error screenshots as suggested by @bricas. Fixes #15
1 parent 42f0320 commit 9167366

File tree

7 files changed

+2750
-2
lines changed

7 files changed

+2750
-2
lines changed

README.MD

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ node ./node_modules/selenium-cucumber-js/index.js -s ./step-definitions
5050
-t, --tags <tagName> name of tag to run
5151
-f, --featureFile <path> a specific feature file to run
5252
-x, --timeOut <n> steps definition timeout in milliseconds. defaults to 10 seconds
53+
-n, --noScreenshot disable auto capturing of screenshots when an error is encountered
5354
```
5455

5556
By default tests are run using Google Chrome, to run tests using another browser supply the name of that browser along with the `-b` switch. Available options are:

features/google-search.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Feature: Searching for vote cards app
66

77
Scenario: Google search for vote cards app
88
When I search Google for "itunes vote cards app"
9-
Then I should see some results
9+
Then I should see "Vote Cards" in the results
1010

1111
Scenario: Google search for course of life app
1212
When I search Google for "CourseOf.Life"

index.js

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ program
2323
.option('-t, --tags <tagName>', 'name of tag to run')
2424
.option('-f, --featureFile <path>', 'a specific feature file to run')
2525
.option('-x, --timeOut <n>', 'steps definition timeout in milliseconds. defaults to 10 seconds', parseInt)
26+
.option('-n, --noScreenshot [optional]', 'disable auto capturing of screenshots when an error is encountered')
2627
.parse(process.argv);
2728

2829
program.on('--help', function() {
@@ -41,6 +42,9 @@ global.reportsPath = path.resolve(program.reports);
4142
// used within world.js to decide if reports should be generated
4243
global.disableLaunchReport = (program.disableLaunchReport);
4344

45+
// used with world.js to determine if a screenshot should be captured on error
46+
global.noScreenshot = (program.noScreenshot);
47+
4448
// used within world.js to output junit reports
4549
global.junitPath = path.resolve(program.junit || program.reports);
4650

0 commit comments

Comments
 (0)