| @@ 62-69 (lines=8) @@ | ||
| 59 | $element = null; |
|
| 60 | foreach ($parts as $part) { |
|
| 61 | $xpath .= '/' . $this->theme->getXTreeChildXpath($part); |
|
| 62 | if(!$this->webDriver->elementExists($xpath, WebDriver::BY_XPATH)) { |
|
| 63 | if ($previousExpandXpath) { |
|
| 64 | $this->testCase->assertElementExists($previousExpandXpath, WebDriver::BY_XPATH); |
|
| 65 | $this->webDriver->byXpath($previousExpandXpath)->click(); |
|
| 66 | $this->webDriver->wait()->until(ExpectedCondition::elementExists($xpath, WebDriver::BY_XPATH)); |
|
| 67 | $this->testCase->sleep('1s'); // Give the menu time to render |
|
| 68 | } |
|
| 69 | } |
|
| 70 | $this->testCase->assertElementExists($xpath, WebDriver::BY_XPATH); |
|
| 71 | $element = $this->webDriver->byXpath($xpath); |
|
| 72 | if (!$element->isDisplayed()) { |
|
| @@ 46-51 (lines=6) @@ | ||
| 43 | $sectionToggleXpath = $this->themeConfiguration->getSystemConfigSectionToggleXpath($instructions[1]); |
|
| 44 | ||
| 45 | $this->testCase->assertElementExists($tabXpath, AbstractTestCase::BY_XPATH); |
|
| 46 | if (!$this->webdriver->elementDisplayed($sectionDisplayXpath, WebDriver::BY_XPATH)) { |
|
| 47 | ||
| 48 | $this->webdriver->byXpath($tabXpath)->click(); |
|
| 49 | ||
| 50 | $this->webdriver->wait()->until(ExpectedCondition::elementExists($sectionDisplayXpath, AbstractTestCase::BY_XPATH)); |
|
| 51 | } |
|
| 52 | ||
| 53 | $this->testCase->assertElementExists($sectionToggleXpath, AbstractTestCase::BY_XPATH); |
|
| 54 | if (!$this->webdriver->elementDisplayed($sectionDisplayXpath, AbstractTestCase::BY_XPATH)) { |
|
| @@ 40-45 (lines=6) @@ | ||
| 37 | } |
|
| 38 | $element = $this->webDriver->byXpath($this->themeConfiguration->getWidgetTabXpath($tab)); |
|
| 39 | $element->click(); |
|
| 40 | if ($header) { |
|
| 41 | $this->webDriver->wait()->until(ExpectedCondition::elementExists($this->themeConfiguration->getWidgetTabHeaderXpath($header), WebDriver::BY_XPATH)); |
|
| 42 | $element = $this->webDriver->byXpath($this->themeConfiguration->getWidgetTabHeaderXpath($header)); |
|
| 43 | } else { |
|
| 44 | $this->loadingMask->wait(); |
|
| 45 | } |
|
| 46 | $this->webDriver->wait()->until(ExpectedCondition::visibilityOf($element)); |
|
| 47 | ||
| 48 | } |
|