Skip to content

I.waitNumberOfVisibleElements('locator', 0) always fails #1172

@lubosek

Description

@lubosek

What are you trying to achieve?

Wait until number of elements on a page goes down to zero (as a workaround to non-working waitForInvisible ) expecting that I.waitNumberOfVisibleElements('div.slds-spinner_container', 0); passes.

What do you get instead?

Number of elements is zero as evidenced by previous call to grabNumberOfVisibleElements but the assertion I.waitNumberOfVisibleElements('div.slds-spinner_container', 0); is false anyway causing the test to fail.

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

...
   I wait 5
   I grab number of visible elements "div.slds-spinner_container"
0
   I wait number of visible elements "div.slds-spinner_container", 0
  ✖ FAILED in 58165ms
-- FAILURES:

  1) Walkthrough
       Routing and navigation:
     The number of elements (div.slds-spinner_container) is not 0 after 10 sec

Details

  • CodeceptJS version: 1.3.2
  • NodeJS Version: 8.9.2
  • Operating System: Mac OS 10.13.4 (17E202)
  • WebDriverIO
  • Configuration file:
{
  "output": "./output",
  "helpers": {
    "WebDriverIO": {
      "url": "https://e2e.pricefx.eu/unity/develop/",
      "browser": "chrome",
      "smartWait": 10000,
      "host": "selenium",
      "waitForTimeout": 10000
    }
  },
  "include": {
    "I": "./steps_file.js",
    "loginPage": "./pages/login-page.js",
    "quotesPage": "./pages/quotes-page.js",
    "contractsPage": "./pages/contracts-page.js",
    "pendingApprovalsPage": "./pages/pendingApprovals-page.js",
    "dashboardsPage": "./pages/dashboards-page.js",
    "configurationPage": "./pages/configuration-page.js",
    "view": "./steps/view.js"
  },
  "mocha": {},
  "bootstrap": false,
  "teardown": null,
  "hooks": [],
  "gherkin": {},
  "tests": "./tests/*-test.js",
  "timeout": 10000,
  "name": "e2e-tests"
}

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