// a random 7-char string and an even number to make this pass unique
$hash = substr(sha1(rand()), 0, 7);
$rand = 2 * rand(2, 50);
- // This is the path where our testing install resides.
- // The rest of URL is defined in CiviSeleniumTestCase base class, in
- // class attributes.
- $this->open($this->sboxPath);
-
// Log in using webtestLogin() method
$this->webtestLogin();
function _testOnlineMembershipSignup($pageId, $memTypeId, $cid = NULL) {
//Open Live Contribution Page
+ $args = array('reset' => 1, 'id' => $pageId);
if ($cid) {
- $contribUrl = array('url' => "contribute/transact", 'args' => "reset=1&id=$pageId&cid=$cid");
- }
- else {
- $contribUrl = array('url' => "contribute/transact", 'args' => "reset=1&id=$pageId");
+ $args['cid'] = $cid;
}
- $this->openCiviPage($contribUrl['url'], $contribUrl['args'], '_qf_Main_upload-bottom');
+ $this->openCiviPage("contribute/transact", $args, '_qf_Main_upload-bottom');
// Select membership type 1
$this->click("xpath=//div[@class='crm-section membership_amount-section']/div[2]//span/label/span[2][contains(text(),'$memTypeId')]");
$this->type("xpath=//div[@class='crm-section other_amount-section']//div[2]/input", 60);
- $this->click("_qf_Main_upload-bottom");
- $this->waitForElementPresent("_qf_Confirm_next-bottom");
- $this->click("_qf_Confirm_next-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next-bottom");
+ $this->clickLink("_qf_Confirm_next-bottom", NULL);
}
-}
\ No newline at end of file
+}