Skip to content

waitForTimeout at the config level is not being applied #327

Closed

Description

@shanmohan

i wanted to increase the wait timeout at the config level, so that i don't have to specify wait period at the test case level. i tried to use the waitForTimeout config within protractor helper. However, i still see this picks default 1s instead my value which is 12s.

output which still picks the 1s timeout

  1) Dashboard: Dashboard widgets are loaded:
     Wait timed out after 1079ms

  Scenario Steps:

  - I.waitForClickable({"css":".profile .user-info"}) at Test.Scenario.only (tests\frontoffice\dashboard_test.js:12:7)
  - I.resizeWindow(1920, 1080) at Object.login (steps_file.js:18:18)
  - I.click("Login") at Object.login (steps_file.js:17:18)
  - I.fillField("Password", "xx") at Object.login (steps_file.js:16:18)
  - I.fillField("Username", "xx") at Object.login (steps_file.js:15:18)
  - I.waitForText("11.22", 120) at Object.login (steps_file.js:14:18)
  - I.waitForElement("//html[contains(@ng-app,'xxxx')]", 120) at Object.login (steps_file.js:13:18)
  - I.amOnPage("https://xxxx") at Object.login (steps_file.js:12:18)

config section for protractor


{
  "tests": "tests/**/*_test.js",
  "output": "./output",
  "helpers": {
    "Protractor": {
      "url": "https://xxxx",
      "driver": "local",
      "browser": "chrome",
      "rootElement": "html",
      "windowSize": "maximize",
      "waitForTimeout" : 120000
    },
    "MyHelper": {
      "require": "./helpers/myhelper.js",
      "defaultHost": "http://mysite.com"
    }
  },
  "include": {
    "I": "./steps_file.js",
    "globalPage": "./pages/global.js"
  },
  "bootstrap": false,
  "mocha": {
    "reporterOptions": {
      "mochaFile": "output/result.xml",
      "reportDir": "output"
    }
  },
  "name": "FastTrack-E2E Tests"
}

codecept.json

  • CodeceptJS version: 0.4.12
  • NodeJS Version: 6.9.1
  • Operating System: Windows 10
  • Protractor : 4.0.11

Appreciate if anyone knows the issue/solution?

Activity

  1. DavertMik commented on Dec 14, 2016

    @DavertMik
    Contributor

    Sorry it looks like a typo in code:

    https://github.com/Codeception/CodeceptJS/blob/master/lib/helper/SeleniumWebdriver.js#L70

    could you try the same with waitforTimeout?

  2. shanmohan commented on Dec 19, 2016

    @shanmohan
    Author

    thanks @DavertMik for the response.

    if i am not wrong, your link is for Selenium and i am using protractor helper. As for protractor, waitforTimeout doesn't seems to have any effect. i have also tried scriptsTimeout but that also doesnt seems to make any impact. Further, i dont see any override parameter for protrator. am i write saying that?

    class Protractor extends SeleniumWebdriver {
      constructor(config) {
        super(config);
        this.options = {
          browser: 'firefox',
          url: 'http://localhost',
          seleniumAddress: 'http://localhost:4444/wd/hub',
          rootElement: 'body',
          scriptsTimeout: 10000,
          driver: 'hosted',
          capabilities: {}
        };
    
  3. shanmohan commented on Dec 27, 2016

    @shanmohan
    Author

    Hello @DavertMik, Is there any update on this issue? Thanks

  4. DavertMik commented on Jan 13, 2017

    @DavertMik
    Contributor

    Sorry, didn't have a chance to look into it deeply. But I will do it today

  5. DavertMik commented on Jan 23, 2017

    @DavertMik
    Contributor

    Thanks, this bug should be fixed in 0.4.16.
    waitForTimeout should now work with Protractor too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions