mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed 3.1-specific switchToWindow() behat feature
This commit is contained in:
parent
4a3a88710f
commit
eb311691be
@ -272,14 +272,16 @@ class CmsUiContext extends BehatContext
|
|||||||
public function iWaitForThePreviewToLoad()
|
public function iWaitForThePreviewToLoad()
|
||||||
{
|
{
|
||||||
$driver = $this->getSession()->getDriver();
|
$driver = $this->getSession()->getDriver();
|
||||||
|
// TODO Remove once we have native support in Mink and php-webdriver,
|
||||||
|
// see https://groups.google.com/forum/#!topic/behat/QNhOuGHKEWI
|
||||||
|
$origWindowName = $driver->getWebDriverSession()->window_handle();
|
||||||
|
|
||||||
$driver->switchToIFrame('cms-preview-iframe');
|
$driver->switchToIFrame('cms-preview-iframe');
|
||||||
|
|
||||||
$this->getSession()->wait(
|
$this->getSession()->wait(
|
||||||
5000,
|
5000,
|
||||||
"!jQuery('iframe[name=cms-preview-iframe]').hasClass('loading')"
|
"!jQuery('iframe[name=cms-preview-iframe]').hasClass('loading')"
|
||||||
);
|
);
|
||||||
|
$driver->switchToWindow($origWindowName);
|
||||||
$driver->switchToWindow();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user