Skip to content

WebDriver: Error message on I.saveScreenshot  #1422

@hubidu

Description

@hubidu

What are you trying to achieve?

Given the following test

Feature('Search holiday destinations @datadriven', { retry: 1 })

const destinations = new DataTable(['destination', 'airport']);
destinations.add(['Mallorca', 'München'])
destinations.add(['Mallorca', 'Frankfurt'])

Data(destinations).Scenario(`When I search for various holiday destinations from different airports I should always get some results @search @holiday`,
async (I, current) => {

    I.say('I goto CHECK24 Reise')
    I.amOnPage('https://urlaub.check24.de/produkte')

    I.say('I enter destination')
    I.fillField('body #c24-travel-destination-element', current.destination)

    I.say('I enter origin')
    // I.pressKey('Enter')
    I.wait(1)
    I.pressKey('Tab')
    I.fillField('body #c24-travel-airport-element', current.airport)
    // I.pressKey('Enter')
    I.wait(1)

    I.saveScreenshot('after-destination-airport.png')

    I.say('I select the duration of my trip')
    I.pressKey('Tab')
    I.pressKey('Tab')
    I.pressKey('Tab')
    I.pressKey('Tab')
    I.pressKey('Tab')
    I.wait(1)
    // I.clickVisible('label[for="duration-2"]')
    I.selectOption('#c24-travel-travel-duration-element', '1w')

    I.say('I click the search button')
    I.click('Reise finden')

    I.say('I check the results')
    I.waitInUrl('/suche')
    I.waitForText('Ergebnisse', '.js-hotel-headline')
    I.waitForInvisible('span.detached-loader')
    I.waitForVisible('.hotel-list-offer-link')
    I.seeElement('.hotel-list-offer-link')
})

What do you get instead?

When codeceptjs hits line

I.saveScreenshot('after-destination-airport.png')

Then I get this error message:

 directory (C:\Users\stefan.huber\projects\e2e-dashboard-client\examples\codeceptjs\C:\Users\stefan.huber\projects\e2e-dashboard-client\examples\codeceptjs\__out) doesn't exist

Provide console output if related. Use --verbose mode for more details.

1) Search holiday destinations @datadriven
       When I search for various holiday destinations from different airports I should always get some results @search @holiday | {"destination":"Mallorca","airport":"München"}:
     directory (C:\Users\stefan.huber\projects\e2e-dashboard-client\examples\codeceptjs\C:\Users\stefan.huber\projects\e2e-dashboard-client\examples\codeceptjs\__out) doesn't exist

  Scenario Steps:

  - I.saveScreenshot("after-destination-airport.png") at Test.Data.Scenario (bifrost-demo\search\search-holiday_test.js:27:7)
  - I.wait(1) at Test.Data.Scenario (bifrost-demo\search\search-holiday_test.js:25:7)
  - I.fillField("body #c24-travel-airport-element", "München") at Test.Data.Scenario (bifrost-demo\search\search-holiday_test.js:23:7)
  - I.pressKey("Tab") at Test.Data.Scenario (bifrost-demo\search\search-holiday_test.js:22:7)
  - I.wait(1) at Test.Data.Scenario (bifrost-demo\search\search-holiday_test.js:21:7)
  - I.fillField("body #c24-travel-destination-element", "Mallorca") at Test.Data.Scenario (bifrost-demo\search\search-holiday_test.js:17:7)
  - I.amOnPage("https://urlaub.check24.de/produkte") at Test.Data.Scenario (bifrost-demo\search\search-holiday_test.js:14:7)

Details

  • CodeceptJS version: 2.0.2
  • NodeJS Version: 8.11.3
  • Operating System: Windows
  • WebDriver
  • Configuration file:
exports.config = {
...
    "output": '__out',
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions