Git Product home page Git Product logo

Comments (7)

chit786 avatar chit786 commented on May 26, 2024

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?

~Thanks
image

from protractor-cucumber-allure.

chit786 avatar chit786 commented on May 26, 2024

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 :
image

Strangely browser.takeScreenshot() is not working . chrome version : Version 60.0.3112.11

from protractor-cucumber-allure.

igniteram avatar igniteram commented on May 26, 2024

@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.

chit786 avatar chit786 commented on May 26, 2024

@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.

image

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.

chit786 avatar chit786 commented on May 26, 2024

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.

chit786 avatar chit786 commented on May 26, 2024

Also do you have any plans of working on allure report ? Cheers.

from protractor-cucumber-allure.

igniteram avatar igniteram commented on May 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.