All we need is an easy explanation of the problem, so here it is.
Improve error messages and add debug info when
- the configuration file cannot be parsed
- a webdriver session cannot be
- 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
--stackTraceflags. Are they also related to debugging and troubleshooting?
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
--troubleshoot does two things:
- It parses the config and provides suggestions on it
- 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.
--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
That being said, there are plans to add additional features to help users troubleshoot their non-running tests in the future.
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂