Skip to content
This repository was archived by the owner on Dec 18, 2019. It is now read-only.

No way to shut off screenshots on error. #15

@christian-bromann

Description

@christian-bromann

From @pmerwin on December 30, 2017 16:55

The problem

There is no way to shut off taking a screenshot on error. We are using Try/Catch and expect errors, and do not need screenshots when that happens, as this slows down the test, and creates more possibility for something to go wrong.

Environment

  • WebdriverIO version: "webdriverio": "^4.9.9",
  • Node.js version: v6.10.3
    *testrunner
  • if wdio testrunner, running synchronous or asynchronous tests: sync
  • Additional wdio packages used (if applicable):

Details

I want to set take screenshot to false inside of try blocks, as when we get an error in a try block, wdio is still taking a screenshot. I want to turn this off/on in my function called from my tes.t

Link to Selenium/WebdriverIO logs

AVailable if needed

Code To Reproduce Issue [ Good To Have ]

available if needed, I have posted on gitter chat for any suggestions and have not received a response. Thanks in advance!

"// Saves a screenshot to a given path if a command fails.
screenshotPath: config.wdio.errors,
//

Anyone know how to shut this off at spec/function level. We use Try/Catch and don't need a screen shot when an error is expected. The only option I see to change is the above. Tried setting this to null, did not work.

Any help? Just wondering what value to set in a local function try/catch that will shut off snapshots on error as I am expecting an error and do not need a snapshot. I thought if the error happened in the try block it should not trigger a snapshot but it does."

Copied from original issue: webdriverio/webdriverio#2529

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions