/** * Find PageID in UIMap in current area using full page URL * * @param string $url Full URL to page * * @return string|boolean */ protected function _findCurrentPageFromUrl($url) { $baseUrl = $this->_applicationHelper->getBaseUrl(); $mca = Mage_Selenium_TestCase::_getMcaFromCurrentUrl($baseUrl, $url); $page = $this->_pageHelper->getPageByMca($mca, $this->_paramsHelper); if ($page) { return $page->getPageId(); } else { $this->fail('Can\'t find page for url: ' . $url); } return false; }
/** * Performs retrieving of file helper instance * * @param Mage_Selenium_TestCase $testCase Current test case as object (by default = NULL) * @param Mage_Selenium_Helper_Application $applicationHelper Current tested application as object (by default = NULL) * * @return Mage_Selenium_Helper_Page */ public function getPageHelper($testCase = null, $applicationHelper = null) { if (is_null($this->_pageHelper)) { $this->_pageHelper = new Mage_Selenium_Helper_Page($this); } if (!is_null($testCase)) { $this->_pageHelper->setTestCase($testCase); } if (!is_null($applicationHelper)) { $this->_pageHelper->setApplicationHelper($applicationHelper); } return $this->_pageHelper; }