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
Behat Interactive Shell #94
Comments
I belive need to correct a mistakes, and not the symptoms... The syntax of Behat test is pretty easy. Otherwise, try http://www.phpsh.org/ |
Sure, the syntax is pretty easy, but minor things like a CSS selector being slightly wrong becomes tedious. All I'm saying is I think it would be a valuable feature to provide. |
In that context - I agree, such feature would be nice. |
This could be very useful for testing javascript-heavy apps running on Selenium. For now, my team have been using rspec with pry just for this specific feature. We're developing those single-page apps that change the page DOM a lot. Selenium has its quirks. Sometimes it loses references to dynamically updated nodes and we need to come up with xpath/css selectors that avoid these problems. Having a console set up ready to test these assertions is very handy. |
I have created part of the solution. Right now I still need to use methods, instead of gherkin language. Here is the first part of the code https://gist.github.com/dbollaer/4985370 and here is an example on how to use it. Given I am on the home page
When I execute
Then I should see "my result" When the program enters execute, I type my commands(interactively) Like: On the end; I type "." |
Add possible option firefox binary
How do I implement this into my feature context file, do I use a 'use' statement or should I change this into a class? |
I put this trait in another file called InteractiveShell.php
|
I am now confused how to use commands like the below from the interactive execute() shell:
Essentially I want to pass the context of the parent class to the execute() method so that I can run mink extension commands. |
I'm closing this issue as it is seems to be very old. Please reopen with updated stats if that's not the case! |
Oftentimes while developing functional tests, I run into very minor errors. The ability to run the commands first in an interactive shell (using readline even?) where it is possible to go back and re-try tests would be wonderful. Being able to then save that out to a file would be even better.
I looked into the Gherkin source: https://github.com/Behat/Gherkin/blob/master/src/Behat/Gherkin/Loader/LoaderInterface.php
If this used
Iterator
it would be much easier, since thenext
could have a readline call in it. Otherwise, it looks like it would be pretty tricky.So... yeah.
The text was updated successfully, but these errors were encountered: