Skip to content
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

Screenshots are not created on windows #24

Open
sreepadbhagwat opened this issue Feb 13, 2014 · 2 comments
Open

Screenshots are not created on windows #24

sreepadbhagwat opened this issue Feb 13, 2014 · 2 comments

Comments

@sreepadbhagwat
Copy link

Screenshots are not created or embedded in html report on windows.

@uscengineer
Copy link

you need to provide more info to get help.
ruby version? windows version? pretty_face gem version? etc.
You seem to be following the book. Did you add the code to the hooks file?

@saclark
Copy link

saclark commented Feb 17, 2014

I do no think this is a Pretty Face issue. Are you using Time.now in the screenshot filename (in accordance with what Page 192 of the Cucumber and Cheese book suggests)? This is a problem for Windows OS's since Time.now will output like this: 2014-02-17 12:21:44 -0500. The problem is the colon :. This is an invalid character for filenames in Windows. Thus, that part of your code throws an error, the screenshot does not save, and any code after that erring line in your After hook will not execute (i.e. @browser.close).

As a suggestion, I use Time.now.strftime("%Y-%m-%d_%H-%M-%S") instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants