Multiple usage of I.saveScreenshot() pauses the codeceptjs testing
See original GitHub issueExpected Result: Trying to take multiple screenshots of the testcase runs, and smooth running of the testcases.
What happens: Codeceptjs hangs during the electron preview and resumes only when I hover over elements on the testing page.
# All test cases passes
Feature('degree matcher (irm3)')
BeforeSuite((I) => {
I.amOnPage('/content/mobileapps/app-one/en/home/components/degree-matcher.html')
I.waitForElement('.degree-matcher__filter')
})
Scenario('search by job area', (I) => {
I.setHash('#') // Reset hash
I.saveScreenshot('debug11.png')
})
Scenario('search by job area', (I) => {
I.setHash('#') // Reset hash
I.saveScreenshot('debug11.png')
})
^Just copy paste the scenario * 15 times and run the test case and this issue comes.
Details
- CodeceptJS version: CodeceptJS v1.0.0
- NodeJS Version: v6.11.2
- Operating System: Windows 10 64bit
- Configuration file:
"devDependencies": {
"mochawesome": "^2.3.0",
"nightmare": "^2.10.0",
"nightmare-upload": "^0.1.1",
"sinon": "2.0.0-pre.6",
"cbt_tunnels": "0.0.35",
"browserstack-local": "^1.3.0",
"chalk": "^1.1.3",
"request-promise": "^4.2.0",
"codeceptjs": "^1.0.0",
"istanbul": "^0.4.5"
}
codecept.json
{
"tests": "./tests/**/*.test.js",
"timeout": 10000,
"output": "./.codeceptjs_output",
"helpers": {
"helper": {
"require": "./scripts/test-utils/codecept-helper.js",
"url": "http://some-random-url.com/",
"show": true,
"restart": false,
"keepCookies": true,
"browser": "chrome",
"scriptTimeout": 30000,
"waitForTimeout": 5000,
"timeouts": {
"page load": 30000,
"script": 30000
}
}
},
"include": {
"I": "./scripts/test-utils/steps.js"
},
"hooks": [
"./scripts/test-utils/hooks.js"
],
"bootstrap": "./scripts/test-utils/bootstrap-teardown.js",
"teardown": "./scripts/test-utils/bootstrap-teardown.js",
"mocha": {
"reporterOptions": {
"reportDir": ".mocha"
}
},
"name": "bum"
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Multiple usage of I.saveScreenshot() pauses the codeceptjs ...
What happens: Codeceptjs hangs during the electron preview and resumes only when I hover over elements on the testing page. # All test...
Read more >Web Testing - CodeceptJS
#saveScreenshot. ✔️ should create a screenshot file in output dir. #runOnIOS, #runOnAndroid, #runInWeb. ✔️ should use Android ...
Read more >Visual Testing - CodeceptJS
The traditional way to test the UI of the application has always been manually, which is time consuming. Visual testing with help of...
Read more >Getting Started - CodeceptJS
You can have multiple configuration files for a the same project, in this case you can specify a config file to be used...
Read more >Nightmare | CodeceptJS
Retrieves an attribute from an element located by CSS or XPath and returns it to test. Resumes test execution, so should be used...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe additional
wait(2)
can help, as generating screenshot takes some time and it might hang because of that. If it doesn’t help, sorry, I have no idea. Maybe @APshenkin have suggestionsHowever, I assume this is an issue of NightmareJS library. CodeceptJS is just a wrapper to their API.
thanks bro… =)