function BrowserWithJavascriptTest::testCreateScreenshot
Same name in other branches
- 8.9.x core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php \Drupal\FunctionalJavascriptTests\BrowserWithJavascriptTest::testCreateScreenshot()
- 10 core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php \Drupal\FunctionalJavascriptTests\BrowserWithJavascriptTest::testCreateScreenshot()
- 11.x core/tests/Drupal/FunctionalJavascriptTests/BrowserWithJavascriptTest.php \Drupal\FunctionalJavascriptTests\BrowserWithJavascriptTest::testCreateScreenshot()
Tests creating screenshots.
File
-
core/
tests/ Drupal/ FunctionalJavascriptTests/ BrowserWithJavascriptTest.php, line 75
Class
- BrowserWithJavascriptTest
- Tests if we can execute JavaScript in the browser.
Namespace
Drupal\FunctionalJavascriptTestsCode
public function testCreateScreenshot() {
$this->drupalGet('<front>');
$this->createScreenshot('public://screenshot.jpg');
$this->assertFileExists('public://screenshot.jpg');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.