question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to take screenshot with allure when using multiremote feature

See original GitHub issue

Unable to have screenshot from the failed test when using combination of browserstack/appium and selenium stand alone services

Environment (please complete the following information):

  • WebdriverIO version: 6.6.4
  • Mode: multiremote feature
  • If WDIO Testrunner, running sync/async: sync
  • Node.js version: 12.18.0
  • NPM version: 6.14.4
  • Browser name and version: chrome
  • Platform name and version: win10 + BS
  • Additional wdio packages used (if applicable):
"dependencies": {
  "@wdio/browserstack-service": "^6.6.3",
  "@wdio/cli": "^6.6.4",
  "eslint": "^7.11.0",
  "frisby": "^2.1.3",
  "wdio-chromedriver-service": "^6.0.4",
  "webdriverio": "^6.6.4"
},
"devDependencies": {
  "@wdio/allure-reporter": "^6.6.3",
  "@wdio/appium-service": "^6.6.3",
  "@wdio/dot-reporter": "^6.6.0",
  "@wdio/local-runner": "^6.6.4",
  "@wdio/mocha-framework": "^6.6.3",
  "@wdio/selenium-standalone-service": "^6.6.5",
  "@wdio/spec-reporter": "^6.6.3",
  "@wdio/sync": "^6.6.4",
  "@wdio/concise-reporter": "^6.6.0",
  "chai": "^4.2.0",
  "mocha": "^8.1.3"
}

Config of WebdriverIO


services: [
  ['selenium-standalone', {
      args: {
        seleniumArgs: ['-port', '4444']
      },
  }],  
  ['browserstack'],
  // ['appium',{
  //   command : 'appium',
  //   args: {
  //       debugLogSpacing: true,
  //       sessionOverride: true,
  //       port: 4728,
  //       allowInsecure:'chromedriver_autodownload'
  //   },
  // }]
],
 afterTest: function(test, context, { error, result, duration, passed, retries }) {
        if (error !== undefined) {
            browser.takeScreenshot();
          }
    },

    reporters: ['dot','spec',['allure', {
        outputDir: 'allure-results',
        disableWebdriverStepsReporting: true,
        disableWebdriverScreenshotsReporting: false,
        disableMochaHooks: true
    }]],

Describe the bug Unable to take screenshot for failed test when using multiremote feature

To Reproduce Steps to reproduce the behavior: use multi-remote feature with broswerstack/appium and selenium

Expected behavior Screenshot should be taken either from Browser or mobile app once test is failing

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
christian-bromanncommented, Oct 19, 2020

Thank you @hieuxlu … love all these great fixes on the multiremote side 👏

1reaction
christian-bromanncommented, Oct 15, 2020

Hey, thanks for filing the issue. This seems indeed like bug. We would appreciate any help on this so please help us out! Have a look at our contributing guidelines and reach out if you have any questions. Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

webdriverio/webdriverio - Gitter
Where do I go to see what parameters come in uri, feature, { error, result, duration, ... To attach screenshot to allure reporter...
Read more >
Attach Screenshots on Test Failure - WebdriverIO | #16
webdriverio #reporting #screenshotIn this video, we will learn how we can take screenshot when the test fails and attach it to our Allure...
Read more >
How to add screenshot in Allure Report for Failure Test Cases
In this video, we will learn about how to add a screenshot for a failure test case in Allure HTML Report.You will learn...
Read more >
Allure Reporter - WebdriverIO
Screenshots can be attached to the report by using the takeScreenshot function from WebDriverIO in afterStep hook. //... var name = 'ERROR-chrome-' +...
Read more >
Wedriver.IO is not including screenshots of execution done on ...
note: I wanted screenshot on fail only, your aim might be the opposite ... And for allure-reporter config (if you use this service, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found