Git Product home page Git Product logo

Comments (5)

igniteram avatar igniteram commented on May 26, 2024

@aluzardo I would investigate on this issue, meanwhile could you downgrade to lower versions of protractor and check if it is working as expected?

from protractor-cucumber-allure.

aluzardo avatar aluzardo commented on May 26, 2024

Yes, you are right. Using protractor 3.3.0 everything works as expected.

Example of result using protractor 3.3.0.

➜  protractor-cucumber-allure git:(not-found-element-stop-process) ✗ npm test

> [email protected] test /Users/adolfocabrera/Mavrix/protractor-cucumber-allure
> protractor Config/config.js

[09:42:48] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[09:42:48] I/launcher - Running 1 instances of WebDriver
Feature: To search allure reports in google

cucumber event handlers attached via registerHandler are now passed the associated object instead of an event
getPayloadItem will be removed in the next major release
  @AllureScenario
  Scenario: Allure Reports Google
Wrong label: @AllureScenario
  ✓ Given I am on google page
  ✖ When I type "allure reports"
  - Then I click search button
  - Then I clear search textbox

Generated Reports/cucumber_report.html successfully.
Feature: To search cucumber in google

  @CucumberScenario
  Scenario: Cucumber Google
Wrong label: @CucumberScenario
  ✓ Given I am on google page
  ✖ When I type "cucumber"
  - Then I click search button
  - Then I clear search textbox

Generated Reports/cucumber_report.html successfully.
Feature: To search protractor in google

  @ProtractorScenario
  Scenario: Protractor Google
Wrong label: @ProtractorScenario
  ✓ Given I am on google page
  ✖ When I type "protractor"
  - Then I click search button
  - Then I clear search textbox

Generated Reports/cucumber_report.html successfully.
Failures:

1) Scenario: Allure Reports Google - Features/allure.feature:4
   Step: When I type "allure reports" - Features/allure.feature:6
   Step Definition: StepDefinitions/search.js:8
   Message:
     NoSuchElementError: No element found using locator: By(css selector, input[name='NotElementFound'])
         at WebDriverError (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/error.js:26:26)
         at NoSuchElementError (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/error.js:229:26)
         at /Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:662:27
         at Promise.invokeCallback_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:1329:14)
         at TaskQueue.execute_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:2790:14)
         at TaskQueue.executeNext_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:2773:21)
         at /Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:2652:27
         at /Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:639:7
         at process._tickCallback (internal/process/next_tick.js:103:7)
     Error
         at ElementArrayFinder.applyAction_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:371:27)
         at ElementArrayFinder._this.(anonymous function) [as sendKeys] (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:83:30)
         at ElementFinder._this.(anonymous function) [as sendKeys] (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:685:22)
         at World.<anonymous> (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/StepDefinitions/search.js:9:30)
         at _combinedTickCallback (internal/process/next_tick.js:67:7)

2) Scenario: Cucumber Google - Features/cucumber.feature:4
   Step: When I type "cucumber" - Features/cucumber.feature:6
   Step Definition: StepDefinitions/search.js:8
   Message:
     NoSuchElementError: No element found using locator: By(css selector, input[name='NotElementFound'])
         at WebDriverError (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/error.js:26:26)
         at NoSuchElementError (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/error.js:229:26)
         at /Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:662:27
         at Promise.invokeCallback_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:1329:14)
         at TaskQueue.execute_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:2790:14)
         at TaskQueue.executeNext_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:2773:21)
         at /Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:2652:27
         at /Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:639:7
         at process._tickCallback (internal/process/next_tick.js:103:7)
     Error
         at ElementArrayFinder.applyAction_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:371:27)
         at ElementArrayFinder._this.(anonymous function) [as sendKeys] (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:83:30)
         at ElementFinder._this.(anonymous function) [as sendKeys] (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:685:22)
         at World.<anonymous> (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/StepDefinitions/search.js:9:30)
         at _combinedTickCallback (internal/process/next_tick.js:67:7)

3) Scenario: Protractor Google - Features/protractor.feature:4
   Step: When I type "protractor" - Features/protractor.feature:6
   Step Definition: StepDefinitions/search.js:8
   Message:
     NoSuchElementError: No element found using locator: By(css selector, input[name='NotElementFound'])
         at WebDriverError (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/error.js:26:26)
         at NoSuchElementError (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/error.js:229:26)
         at /Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:662:27
         at Promise.invokeCallback_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:1329:14)
         at TaskQueue.execute_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:2790:14)
         at TaskQueue.executeNext_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:2773:21)
         at /Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:2652:27
         at /Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/selenium-webdriver/lib/promise.js:639:7
         at process._tickCallback (internal/process/next_tick.js:103:7)
     Error
         at ElementArrayFinder.applyAction_ (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:371:27)
         at ElementArrayFinder._this.(anonymous function) [as sendKeys] (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:83:30)
         at ElementFinder._this.(anonymous function) [as sendKeys] (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/node_modules/protractor/built/element.js:685:22)
         at World.<anonymous> (/Users/adolfocabrera/Mavrix/protractor-cucumber-allure/StepDefinitions/search.js:9:30)
         at _combinedTickCallback (internal/process/next_tick.js:67:7)

3 scenarios (3 failed)
12 steps (3 failed, 6 skipped, 3 passed)
0m00.181s
Report created successfully!
[09:42:55] I/launcher - 0 instance(s) of WebDriver still running
[09:42:55] I/launcher - chromeANY #01 failed 3 test(s)
[09:42:55] I/launcher - overall: 3 failed spec(s)
[09:42:55] E/launcher - Process exited with error code 1
npm ERR! Test failed.  See above for more details.

But using protractor 3.3.0 is not a proper solution for me because I am using a selenium remote grid to run the test and this version of protractor is not compatible to run the test. I get a weird error

'<html>\n<head><title>301 Moved Permanently</title></head>\n<body bgcolor="white">\n<center><h1>301 Moved Permanently</h1></center>\n<hr><center>nginx/1.4.6 (Ubuntu)</center>\n</body>\n</html>\n

from protractor-cucumber-allure.

igniteram avatar igniteram commented on May 26, 2024

@aluzardo I have done some investigation and turns it out this is an issue with the recent protractor versions.

This is mainly due to protractor's uncaught exception handling, cucumber listener's catch it after the protractor's exception hence causing the step definition to fail abruptly.

The issues - angular/protractor#3553 and angular/protractor#3491 have been raised already. Soon it should be resolved in coming releases!

from protractor-cucumber-allure.

igniteram avatar igniteram commented on May 26, 2024

tagged it as external bug and pretty good discussions are going on the respective issues logged in protractor repo, I would still keep it open until it is fixed!

from protractor-cucumber-allure.

igniteram avatar igniteram commented on May 26, 2024

This issue should be fixed with angular/protractor#3608, hence closing it!

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.