Comments (7)
I am able to handle this by , ignoreUncaughtExceptios:true
, in config, but this does not completely solve the problem, as I am also expecting a screenshot, which is not working and getting a timeout in After hook. Any thoughts?
from protractor-cucumber-allure.
Hi ,
After({ timeout: 20 * 1000 },function(scenario) {
if (scenario.isFailed()) {
var attach = this.attach; // cucumber's world object has attach function which should be used
return browser.takeScreenshot().then(function(png) {
var decodedImage = new Buffer(png, "base64");
return scenario.attach(decodedImage, "image/png");
});
}
});
modified After hook like this solves the timeout problem,
but then received following error :
Strangely browser.takeScreenshot() is not working . chrome version : Version 60.0.3112.11
from protractor-cucumber-allure.
@chit786 Can you please specify the versions of following modules which you are using in your project?
- protractor
- cucumber
- protractor-cucumber-framework
So that I could debug this specific issue!
from protractor-cucumber-allure.
@igniteram thank you for reverting.
Well, I just cloned your repo and trying to run it as per my expectations! just checking for how the screenshots gets appended, but unfortunately, not able to see the screenshot working.
{
"name": "protractor-cucumber-allure",
"version": "1.0.0",
"license": "MIT",
"description": "To demostrate protractor cucumber tests for angular/non angular apps with allure report framework",
"homepage": "https://github.com/igniteram/protractor-cucumber-allure",
"keywords": [
"protractor",
"cucumber",
"allure reports",
"angular",
"angularjs",
"testing",
"behaviour driven development",
"bdd",
"selenium",
"webdriverJS",
"posgreSQL",
"gherkin",
"automation testing"
],
"main": "index.js",
"scripts": {
"test": "protractor config/config.js",
"webdriver-start": "webdriver-manager start",
"webdriver-update": "webdriver-manager update"
},
"author": "Ram Pasala [email protected]",
"dependencies": {
"chai": "^4.0.2",
"cucumber": "^2.3.0",
"mkdirp": "^0.5.1",
"protractor": "^5.1.1",
"protractor-cucumber-framework": "^3.1.0"
},
"devDependencies": {
"chai-as-promised": "^6.0.0",
"cucumber-html-report": "^0.6.0",
"cucumber-html-reporter": "^0.5.2",
"cucumberjs-allure-reporter": "^1.0.3",
"pg": "^6.0.3"
},
"repository": "https://github.com/igniteram/protractor-cucumber-allure"
}
I have not changed as such anything, just npm install after cloning.
Also observed one thing that ,
onPrepare: function() {
browser.ignoreSynchronization = true;
//browser.manage().window().maximize();
global.expect = chai.expect;
},
I had to comment this window.maximize in this version of webdriver.
I am running protractor globally. with below characteristics of chrome driver and selenium webdriver.
The problem I am seeing is with the takeScreenshot
function of the browser
which is not able to consume browser
object.
but when I did console.log(typeof browser) It correctly gave me object type, in After hook. So trying to figure out what am I missing here.
Thanks again.
from protractor-cucumber-allure.
Well.. I tried again . this time locally and not global protractor. on local package protractor version I am getting chromedriver version as 2.32 and that is working fine.. so closing this issue. I believe it has something to do with the chromedriver version .
Thanks for this amazing work.
from protractor-cucumber-allure.
Also do you have any plans of working on allure report ? Cheers.
from protractor-cucumber-allure.
Glad it worked! currently cucumberjs-allure-reporter doesn't support cucumber 2.x version onwards and sadly that repo isn't active anymore. So someone has to raise a PR or create a new repo for support of new cucumber versions with allure. I would love to work on it if I get time but considering my work commitments I can't assure though :)
from protractor-cucumber-allure.
Related Issues (20)
- Fix and Add Circle-CI ! HOT 1
- Add a test-util for CI checks!
- Report does not have all the features when the sharding is set to true HOT 5
- Allure reporter doesn't support cucumber 2.0 bindings HOT 1
- Not able to run test by command 'npm test' HOT 6
- Screenshot is not captured HOT 4
- Upgrading cuucmber-protratctor-framework and cuucmber version to latest version breaks the tests HOT 3
- Add a customized protractor cucumber HTML report HOT 1
- Upgrade to ES6 syntax! HOT 3
- browser.restart with Page object pattern do not work HOT 4
- function timed out after 5000 milliseconds HOT 6
- Not found element stop process HOT 5
- Json reports name issue HOT 1
- Parallel execution does not work
- Add support for cucumberjs-allure2-reporter
- Add support for cucumber2.0 HOT 1
- cucumber-html-reporter not being generated! HOT 1
- Chrome Driver Execution: Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries. HOT 1
- CucumberHtmlReport is not a constructor HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protractor-cucumber-allure.