-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot go to behave-webdriver step declaration in PyCharm (Professional) #75
Comments
Thank you for submitting this issue @Strasznik I was able to reproduce the issue you were having. It appears that the PyCharm module responsible for identifying steps is identifying the characters in the step definitions meant for field replacements (e.g. After some investigation, I discovered this is due to PyCharm not being able to detect steps using the custom matchers that are used by behave-webdriver. When installing I'll work towards a resolution on this for the next release. This might mean removing the custom transformation matchers from the library, which may have not been as great an idea as originally thought. |
Additionally, in some places I change the matcher in the middle of the step file. Even in v0.1.0, regex matcher steps defined after parse matcher steps in the same file are not detected correctly by PyCharm either. |
@Strasznik I've managed to come up with a workaround to this problem and believe I have a working solution in the If you could please test and let me know. You can install from the branch with pip by the following command:
|
Spencer, Thank you very much for such quick action. I just installed the version from branch |
Glad to hear it. I should have this merged and on PyPI within the next day or so. Cheers! |
Apologies for delay in getting this out to PyPI. I'm currently tracking the deployment problem in #77 Meantime, installing from |
I'm using behave-webdriver as a part of my BDD Python testing framework. It works very well, although I have a problem with going to step declaration in PyCharm. It will be best to explain it through example. Let's say I want to use "When I move to element" step. First thing is that when I want to use this sentence and I use PyCharm autocomplete it is autocompleted as
When I move to element "{element}"
This sentence is not recognizable by PyCharm autocomplete. I can fix it by removing backslashes:
When I move to element "{element}"
This one IS visible by PyCharm. I can use "go to declaration".
But, when I change variable element to any other name than "element" than again "go to declaration" is not working, e.g.:
When I move to element "{some_element}"
Any other BDD sentences with an argument, which were written by me are working correctly (go to the declaration is working), e.g.: Some step with "example_parameter"
Are you familiar with this issue? I'm guessing that it might be PyCharm problem, not behave-webdriver.
The text was updated successfully, but these errors were encountered: