-
Notifications
You must be signed in to change notification settings - Fork 1
Classrename #9
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
Classrename #9
Conversation
npgarcia
commented
Mar 15, 2016
- Moving After and Before hooks to a class named Hooks
- Starting steps to contain only steps
- Added try-catch to screenshot in after hook
| import java.io.IOException; | ||
|
|
||
|
|
||
| public class Hooks { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this class being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class will be used to contain the Before and After Hooks.
So will be used every time a scenario run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok thanks. Probably it's a good idea to add documentation on how and why to use this methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That information is already in Cucumber page, I don't see the need of duplicating the information in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NVM, I was not clear of how this was working :) But @ulisespulido was kind enough to explain to me.
| try { | ||
| final byte[] screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES); | ||
| scenario.embed(screenshot, "image/png"); | ||
| } catch (WebDriverException e){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉