Skip to content

I.amOnPage is not a function #535

@tamj0rd2

Description

@tamj0rd2

What are you trying to achieve?

Trying to run a simple test following the QuickStart on website using codeceptjs init
http://codecept.io/quickstart/

What do you get instead?

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

> .\node_modules\.bin\codeceptjs run --steps --verbose
CodeceptJS v0.6.3
Using test root "C:\Users\tamj0rd2\coding\autotools3"

My First Test --
   [1] Starting recording promises
   Emitted | suite.before ([object Object])
 test something
   [2] Starting recording promises
   Emitted | test.before
   Emitted | test.start ([object Object])
   [2] Queued | throw error TypeError: I.amOnPage is not a function
   [2] Queued | fire test.passed
   [2] Queued | finish test
   [2] Error | TypeError: I.amOnPage is not a function
   [2] Starting <teardown> session
   Emitted | test.failed ([object Object])
   [2] <teardown> Queued | () => done(err)
   [2] <teardown> Stopping recording promises
 × FAILED in 7ms

   Emitted | test.after
   [3] Starting recording promises
   Emitted | suite.after ([object Object])

-- FAILURES:

  1) My First Test: test something:
     I.amOnPage is not a function
  ypeError: I.amOnPage is not a function
      at Test.Scenario (tests\first_test.spec.js:4:5)
      at Context.test.fn (node_modules\codeceptjs-webdriverio\node_modules\codeceptjs\lib\scenario.js:29:24)


  FAIL  | 0 passed, 1 failed   // 27ms
   Emitted | global.result ([object Object])

Provide test source code if related

Feature('My First Test')

Scenario('test something', (I) => {
  I.amOnPage('/')
  I.see('Something')
})

Details

  • CodeceptJS version: 1.0.1
  • NodeJS Version: v6.9.2
  • Operating System: Windows 10
  • WebDriverIO version: 4.8.0
  • Configuration file:
{
  "tests": "./tests/**/*.spec.js",
  "timeout": 10000,
  "output": "./codecept_output",
  "helpers": {},
  "include": {
    "I": "./tests/steps_file.js"
  },
  "bootstrap": false,
  "mocha": {},
  "name": "autotools3"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions