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

Update WebDriver:makeScreenshot to accept noname #4263

Merged
merged 3 commits into from Jun 2, 2017

Conversation

Projects
None yet
2 participants
@eXorus
Contributor

eXorus commented May 26, 2017

Hello,

Currently, makeScreenshot of WebDriver require a name to save a file.

This little PR accept noname.

$I->makeScreenshot('edit_page'); //saved to: tests/_output/debug/edit_page.png
$I->makeScreenshot(); //saved to: tests/_output/debug/2017-05-26_14-24-11.png

What do you think ?

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik May 26, 2017

Member

Looks good to me 👍

Member

DavertMik commented May 26, 2017

Looks good to me 👍

Show outdated Hide outdated src/Codeception/Module/WebDriver.php
{
$name = ($name) ? $name : date("Y-m-d_H-i-s");

This comment has been minimized.

@DavertMik

DavertMik May 26, 2017

Member

In case a test will be executed in parallel this may produce a conflict between 2 files.
how about adding uniqid to the name?

also please refactor this code using if operator.

@DavertMik

DavertMik May 26, 2017

Member

In case a test will be executed in parallel this may produce a conflict between 2 files.
how about adding uniqid to the name?

also please refactor this code using if operator.

eXorus added some commits May 30, 2017

@eXorus

This comment has been minimized.

Show comment
Hide comment
@eXorus

eXorus May 30, 2017

Contributor

@DavertMik There is no conflict with parallel execution because the screenshot will be replaced. But I added uniqid to be sure that all screenshot will be saved.

I have kept the date to be able to see the order.

Contributor

eXorus commented May 30, 2017

@DavertMik There is no conflict with parallel execution because the screenshot will be replaced. But I added uniqid to be sure that all screenshot will be saved.

I have kept the date to be able to see the order.

@DavertMik DavertMik merged commit 15b284a into Codeception:2.3 Jun 2, 2017

1 of 4 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
wercker/build Wercker pipeline failed
Details
semaphoreci The build passed on Semaphore.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment