Guest User

Untitled

a guest
Feb 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. /**
  2. * Select store view on Create/Edit tag page
  3. *
  4. * @param string $store_view Name of the store
  5. */
  6. protected function selectStoreView($store_view)
  7. {
  8. if (!$store_view) {
  9. return true;
  10. }
  11. $xpath = $this->_getControlXpath('dropdown', 'switch_store');
  12. $toSelect = $xpath . "//option[contains(.,'" . $store_view . "')]";
  13. $isSelected = $toSelect . '[@selected]';
  14. if (!$this->isElementPresent($isSelected)) {
  15. $storeId = $this->getAttribute($toSelect . '/@value');
  16. $this->addParameter('storeId', $storeId);
  17. $this->fillForm(array('switch_store' => $store_view));
  18. $this->waitForPageToLoad();
  19. }
  20. }
Add Comment
Please, Sign In to add comment