Skip to content

Commit e0f6001

Browse files
committed
Merge branch 'release/v3.4.8.1'
2 parents 11625d5 + 8a09e59 commit e0f6001

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/JoomlaBrowser.php

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ public function setErrorReportingToDevelopment()
290290
$this->debug('I wait for error reporting dropdown');
291291
$I->selectOptionInChosen('Error Reporting', 'Development');
292292
$this->debug('I click on save');
293-
$I->clickToolbarButton('save');
293+
$I->click(['xpath' => "//button[@onclick=\"Joomla.submitbutton('config.save.application.apply')\"]"]);
294294
$this->debug('I wait for global configuration being saved');
295295
$I->waitForText('Global Configuration',60,['css' => '.page-title']);
296296
$I->see('Configuration successfully saved.',['id' => 'system-message-container']);
@@ -505,7 +505,7 @@ public function enablePlugin($pluginName)
505505
$I->waitForElement($this->searchResultPluginName($pluginName), 30);
506506
$I->checkExistenceOf($pluginName);
507507
$I->click(['xpath' => "//input[@id='cb0']"]);
508-
$I->clickToolbarButton('publish');
508+
$I->click(['xpath' => "//div[@id='toolbar-publish']/button"]);
509509
$I->see('successfully enabled', ['id' => 'system-message-container']);
510510
}
511511

@@ -653,7 +653,7 @@ public function setModulePosition($module, $position = 'position-7')
653653
$I->click(['link' => $module]);
654654
$I->waitForText($module, 30, ['css' => 'H3']);
655655
$I->selectOptionInChosen('Position', $position);
656-
$I->clickToolbarButton('save');
656+
$I->click(['xpath' => "//div[@id='toolbar-apply']/button"]);
657657
$I->waitForText('Module successfully saved',30,['id' => 'system-message-container']);
658658
}
659659

@@ -668,7 +668,7 @@ public function publishModule($module)
668668
$I->amOnPage('administrator/index.php?option=com_modules');
669669
$I->searchForItem($module);
670670
$I->checkAllResults();
671-
$I->clickToolbarButton('publish');
671+
$I->click(['xpath' => "//div[@id='toolbar-publish']/button"]);
672672
$I->waitForText('1 module successfully published.',30,['id' => 'system-message-container']);
673673
}
674674

@@ -688,7 +688,7 @@ public function displayModuleOnAllPages($module)
688688
$I->waitForElement(['id' => 'jform_menus-lbl'], 30);
689689
$I->click(['id' => 'jform_assignment_chzn']);
690690
$I->click(['xpath' => "//li[@data-option-array-index='0']"]);
691-
$I->clickToolbarButton('save');
691+
$I->click(['xpath' => "//div[@id='toolbar-apply']/button"]);
692692
$I->waitForText('Module successfully saved',30,['id' => 'system-message-container']);
693693
}
694694

@@ -702,11 +702,6 @@ public function clickToolbarButton($button)
702702
$I = $this;
703703
$input = strtolower($button);
704704

705-
$element = $this->webDriver->findElements(WebDriverBy::linkText("Toolbar"));
706-
if(!empty($element) && $element[0]->isDisplayed())
707-
{
708-
$I->click('Toolbar');
709-
}
710705
switch($input)
711706
{
712707
case "new":
@@ -781,7 +776,7 @@ public function createMenuItem($menuTitle, $menuCategory, $menuItem, $menu = 'Ma
781776
$this->checkForPhpNoticesOrWarnings();
782777

783778
$I->debug("I click new");
784-
$I->clickToolbarButton('new');
779+
$I->click("New");
785780
$I->waitForText('Menus: New Item', '60', ['css' => 'h1']);
786781
$this->checkForPhpNoticesOrWarnings();
787782
$I->fillField(['id' => 'jform_title'], $menuTitle);
@@ -808,7 +803,7 @@ public function createMenuItem($menuTitle, $menuCategory, $menuItem, $menu = 'Ma
808803
$I->selectOptionInChosen('Language', $language);
809804
$I->waitForText('Menus: New Item','30', ['css' => 'h1']);
810805
$I->debug('I save the menu');
811-
$I->clickToolbarButton('save');
806+
$I->click("Save");
812807

813808
$I->waitForText('Menu item successfully saved', '60', ['id' => 'system-message-container']);
814809
}

0 commit comments

Comments
 (0)