Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
- As the ChromeDriver has got some changes on updates it will have issues with old testing configs
- Update emuse/behat-html-formatter to ^0.2.0
- Change [ Feature: Content Management - Add hero slider to entity queue using entity queue form widget ] Automated Functional Acceptance Testing
Add a definition step to check if the media browser with the selected iframe id is open with Varbase Context for Behat Automated Functional Acceptance Testing
/**
* #varbase: To check if the media browser with the selected iframe id
* is open.
*
* Example : Then the "entity_browser_iframe_media_browser" media browser should be open
*
* @Then /^the "([^"]*)" media browser should be open$/
*/
public function theMediaBrowserIsOpen($entityBrowserIframeId) {
if (!$elem = $this->getSession()->getPage()->find('css', '.ui-dialog.ui-widget-content')) {
throw new Exception('The media browser failed to open.');
}
$entityBrowserIframe = $this->getSession()->getPage()->find('css', "#$entityBrowserIframeId");
if (!$entityBrowserIframeId) {
throw new \Exception("$entityBrowserIframeId is not found.");
}
}
Resize the current window browser to a selected width and height
/**
* #varbase: Resize the current window browser to a selected width and height.
*
* Example #1: And I resize the current window to width="1280" and height="600"
*
* @Given /^I resize the current window to width="([^"]*)" and height="([^"]*)"$/
*/
public function resizeTheCurrentWindowToWidthAndHeight($width, $height) {
$this->getSession()->resizeWindow((int)$width, (int)$height, 'current');
}
Maximize the window before scenario
/**
* Maximize the window before scenario.
*
* @BeforeScenario @javascript
*/
public function beforeScenarioMaximizeWindow() {
$this->getSession()->getDriver()->maximizeWindow();
}
Comment | File | Size | Author |
---|---|---|---|
#18 | varbase-maximize_the_window_before_scenario-3085506-18.patch | 670 bytes | metalbote |
Comments
Comment #9
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #10
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #12
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedhttps://travis-ci.org/Vardot/varbase/builds/593944961
Comment #13
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #14
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #15
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #18
metalboteSorry for reopening...
Problem/Motivation
stucks on Selenium because session is not started and gets not started, therefore not possible to maximize browser window.
Proposed resolution
Test if session is started, and if not start it.