Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Errors and questions about the tutorial #2

Closed
wswebcreation opened this issue Jun 4, 2017 · 3 comments
Closed

Errors and questions about the tutorial #2

wswebcreation opened this issue Jun 4, 2017 · 3 comments

Comments

@wswebcreation
Copy link
Contributor

Hi there,

I was playing around with the tutorial and found some problems with it / have some questions.

Problems:
When I run the branch 1-first-scenario-implemented I get the following error:

[19:16:48] I/launcher - Running 1 instances of WebDriver
[19:16:48] I/local - Starting selenium standalone server...
[19:16:48] I/local - Selenium standalone server started at http://192.168.1.16:62574/wd/hub
Feature: Add new items to the todo list

    In order to avoid having to remember things that need doing
    As a forgetful person
    I want to be able to record what I need to do in a place where I won't forget about them

  Scenario: Adding an item to a list with other items
  ✔ Given that James has a todo list containing Buy some cookies, Walk the dog
  ✔ When he adds Buy some cereal to his list
  ✔ Then his todo list should contain Buy some cookies, Walk the dog, Buy some cereal

[19:16:54] E/launcher - BUG: launcher exited with 1 tasks remaining
npm ERR! Test failed.  See above for more details.

The error is there because of this line in the protractor.conf.js-file, restartBrowserBetweenTests: true, if you remove it / set it to false the error is gone. It's related to protractor issue 4087, but maybe better to remove it from the tutorial because I was now focussing on the error in stead of the tutorial (was thinking I was doing something wrong).

I also got some coding errors due to the tslint based on the default code that was cloned? (Like not alphabetized imports, missing semicolon and so on?

Questions:

  • Is it wise to add the 'disable-infobars' to chromeOptions.args to remove the security warning, or is there a reason not to remove it?
  • Is there a reason that the preprotractor installs old versions of the chromedriver? Or is it better to remove it and make a reference in the docs to the (standalone) webdriver-manager
  • Is it also wise to remove the "dependency" of the directConnect and to advice to install a "standalone" webdriver-manager" so we can also use the --highlghtDelay` to the script. This is for just showing the user of the tutorial how the script works in the browser?
  • Is it wise also to upgrade some dependencies for example the protractor-cucumber-framework and the typings

If I can help with it please let me know,. I can create a PR for it if you like

@jan-molak
Copy link
Member

Hey @wswebcreation!

The TODO MVC app used in the tutorial uses local storage, so if the browser is not restarted between the sessions, the list of todo items is populated with entries from the previous test run.
Another way to work around it would be to clear local storage between the tests.

I think the problem with BUG: launcher exited with 1 tasks remaining could be caused by something similar to protractor-cucumber-framework/protractor-cucumber-framework#86 and there's already a conversation about this problem at serenity-js/serenity-js#34

I need to look into this, but help is appreciated :-)

Is it wise to add the 'disable-infobars' to chromeOptions.args to remove the security warning, or is there a reason not to remove it?

Nope, that's a good idea.

Is there a reason that the preprotractor installs old versions of the chromedriver? Or is it better to remove it and make a reference in the docs to the (standalone) webdriver-manager

There was a bug which prevented protractor from being used with the latest chromedriver. I don't have the reference at hand though.

Is it also wise to remove the "dependency" of the directConnect and to advice to install a "standalone" webdriver-manager" so we can also use the --highlghtDelay to the script. This is for just showing the user of the tutorial how the script works in the browser?

Sure, sounds sensible.

Is it wise also to upgrade some dependencies for example the protractor-cucumber-framework and the typings.

Sure, good idea.

A PR would be lovely, thanks!

J

@wswebcreation
Copy link
Contributor Author

Hi @jan-molak

Will take a look at it the comming days.

Tnx

Grtz

Wim Selles 😉

@jan-molak
Copy link
Member

Merged, thanks for your contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants