morooLee / wdio-slack-reporter

This reporter provides slack notifications of WebdriverIO test results.
11 stars 6 forks source link

Screenshot not showing #6

Closed andisan86 closed 3 years ago

andisan86 commented 3 years ago

Hi there, I am having issues with screenshot attached to slack notification. Just wondering if you could help?

Details:

Steps:

  1. Use web-api setting with uploadScreenshotOfFailedCase = true
  2. Run test case with expected failed step

Actual outcome: In slack notification > thread, the screenshot showed blank screen image

Expected outcome: Screenshot should be shown

morooLee commented 3 years ago

Perhaps the failure occurred before the screen was displayed. First of all, can you delay with browser.pause() and check again? Can you share the test script?

andisan86 commented 3 years ago

@morooLee Thanks for the reply.

I added browser.pause() before the assertion and the screenshot was still not included in the slack notification. The test script look like below:

browser.url('https://nomnom.beta.oddle.me/en_SG')
browser.pause(5000)
expect(true).to.eq(false)

The expect above is deliberately produce failed result. I have also used Allure report, and it included correct screenshot when failed assertion occurred. image

morooLee commented 3 years ago

It may be that there is no support for webdriverio version or cucumber. Accurate analysis is possible only when there is a log. I’m working on webdriverio 7.x right now and will update within 1 week. Can you please wait for the update?

andisan86 commented 3 years ago

Of course, thanks a lot.

morooLee commented 3 years ago

@andisan86 Thank you for waiting. I just updated to 2.0. Would you mind checking it out?

morooLee commented 3 years ago

Since there is no answer, I will judge it to be resolved and close it.