Last active
April 2, 2018 01:38
-
-
Save mrsimonbennett/94895430c6c7560f6e777869e485d480 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$browser->visit('Login') | |
->tap( | |
function (Browser $browser) { | |
$points = $browser->resolver->find("#TotalCount")->getText(); | |
$this->mailer->send( | |
'mail', | |
['points' => $points], | |
function (Message $mailable) use ($browser, $points) { | |
$mailable->from('[email protected]', 'Pixelated Bot'); | |
$mailable->to('[email protected]', 'Someone '); | |
$mailable->subject($points . ' - Points'); | |
$mailable->attachData($browser->driver->takeScreenshot(), 'points.png'); | |
} | |
); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment