MDL-35590 behat: Data-loaded is on li node

This commit is contained in:
Rajesh Taneja
2016-01-29 10:15:25 +08:00
committed by David Monllao
parent 3c415f13b8
commit 80f37f2739
+3 -2
View File
@@ -272,8 +272,9 @@ class behat_navigation extends behat_base {
$nodetoexpand->click();
// Wait for node to load, if not loaded before.
if ($nodetoexpand->hasAttribute('data-loaded') && $nodetoexpand->getAttribute('data-loaded') == "false") {
$jscondition = '(document.evaluate("' . $nodetoexpand->getXpath() . '", document, null, '.
$linode = $nodetoexpand->getParent();
if ($linode->hasAttribute('data-loaded') && $linode->getAttribute('data-loaded') == "false") {
$jscondition = '(document.evaluate("' . $linode->getXpath() . '", document, null, '.
'XPathResult.ANY_TYPE, null).iterateNext().getAttribute(\'data-loaded\') == "true")';
$this->getSession()->wait(self::EXTENDED_TIMEOUT * 1000, $jscondition);