Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protractor troubleshooting

In protractor 1.5.0, there was a new --troubleshoot flag introduced, which is not properly documented at the moment, but in the changelog it states:

Improve error messages and add debug info when

  • the configuration file cannot be parsed
  • a webdriver session cannot be started
  • more than one element is found using element

Which use cases does --troubleshoot command-line argument cover?


The reason I ask is that this is a bit confusing:

  • Should not it be enabled by default? Because if there are errors like listed above, having an additional information about the error would be helpful.
  • There are also relevant --verbose and --stackTrace flags. Are they also related to debugging and troubleshooting?
like image 350
alecxe Avatar asked Feb 20 '15 19:02

alecxe


People also ask

Is Protractor discontinued?

Protractor launched in 2013 before WebDriver APIs were standard and E2E tests were hard to write, and it tests Angular and AngularJS apps by running them in Google Chrome. It will continue to run until the end of 2022 when Angular 15 will be the last update.

Why is Protractor being deprecated?

Protractor Will Be Deprecated Some of the reasons behind these deprecation plans are: State of Protractor. Protractor is dependent on selenium-webdriver , and is not able to upgrade to the new version without introducing a huge breaking change, and forcing users to do a migration for all their tests.


1 Answers

Currently --troubleshoot does two things:

  1. It parses the config and provides suggestions on it
  2. It prints out all the relevant environment variables (OS, protractor version, framework, capabilities, etc) so that when they report the problems others like me can look at this information to identify if the issue is related to the environment.

Right now, --troubleshoot aims to help users who cannot get protractor to run (NOT for troubleshooting failed tests). And it's more like:

if you can't get protractor to run, run this mode to see if it catches anything before submitting an issue; if it doesn't, paste the output from troubleshoot so we don't have to ask about OS/version/etc every time.

That being said, there are plans to add additional features to help users troubleshoot their non-running tests in the future.

like image 64
hankduan Avatar answered Sep 27 '22 18:09

hankduan