$this->openCiviPage("admin/financial/financialAccount", "reset=1");
}
- $this->waitForElementPresent("xpath=//table/tbody//tr/td[1][text()='{$editfinancialAccount}']/../td[9]/span/a[text()='Edit']");
- $this->clickLink("xpath=//table/tbody//tr/td[1][text()='{$editfinancialAccount}']/../td[9]/span/a[text()='Edit']", '_qf_FinancialAccount_cancel-botttom', FALSE);
+ $this->waitForElementPresent("xpath=//table/tbody//tr/td[1]/div[text()='{$editfinancialAccount}']/../../td[9]/span/a[text()='Edit']");
+ $this->clickLink("xpath=//table/tbody//tr/td[1]/div[text()='{$editfinancialAccount}']/../../td[9]/span/a[text()='Edit']", '_qf_FinancialAccount_cancel-botttom', FALSE);
// Change Financial Account Name
if ($financialAccountTitle) {
* Delete Financial Account
*/
public function _testDeleteFinancialAccount($financialAccountTitle) {
- $this->click("xpath=//table/tbody//tr/td[1][text()='{$financialAccountTitle}']/../td[9]/span/a[text()='Delete']");
+ $this->click("xpath=//table/tbody//tr/td[1]/div[text()='{$financialAccountTitle}']/../../td[9]/span/a[text()='Delete']");
$this->waitForElementPresent('_qf_FinancialAccount_next-botttom');
$this->click('_qf_FinancialAccount_next-botttom');
$this->waitForElementPresent('link=Add Financial Account');
$this->openCiviPage("admin/financial/financialType", "reset=1");
if ($option == 'Delete') {
- $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$financialType[name]']/../td[7]/span[2]");
+ $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1]/div[text()='$financialType[name]']/../../td[7]/span[2]");
$this->waitForElementPresent("css=span.btn-slide-active");
- $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$financialType[name]']/../td[7]/span[2]/ul/li[2]/a");
+ $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1]/div[text()='$financialType[name]']/../../td[7]/span[2]/ul/li[2]/a");
$this->waitForElementPresent("_qf_FinancialType_next");
$this->click("_qf_FinancialType_next");
$this->waitForElementPresent("newFinancialType");
$this->click("link=Add Financial Type");
}
else {
- $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$financialType[oldname]']/../td[7]/span/a[text()='Edit']");
+ $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1]/div[text()='$financialType[oldname]']/../../td[7]/span/a[text()='Edit']");
}
$this->waitForElementPresent("name");
$this->type('name', $financialType['name']);
$this->click('_qf_ScheduleReminders_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->click("//div[@id='reminder']//div[@id='option11_wrapper']/table/tbody//tr/td[1][text()='{$title}']/../td[7]/span/a[text()='Edit']");
+ $this->click("xpath=//div[@id='reminder']/div/table/tbody//tr/td[1]/div[text()='{$title}']/../../td[7]/span/a[text()='Edit']");
$this->waitForElementPresent('_qf_ScheduleReminders_cancel-bottom');
$this->assertEquals($title, $this->getValue('id=title'));
//Is custom field created
$this->waitForText('crm-notification-container', "Custom field '$textFieldLabel' has been saved.");
- $textFieldId = explode('&id=', $this->getAttribute("xpath=//table[@id='options']/tbody//tr/td[1]/span[text()='$textFieldLabel']/../../td[8]/span/a[1][text()='Edit Field']/@href"));
+ $textFieldId = explode('&id=', $this->getAttribute("xpath=//table[@id='options']/tbody//tr/td[1]/div[text()='$textFieldLabel']/../../td[8]/span/a[1][text()='Edit Field']/@href"));
$textFieldId = $textFieldId[1];
return array($radioOptionLabel1, "custom_{$textFieldId}_-1");
$this->waitForElementPresent('title');
$this->type('title', $editCaseTypeLabel);
- $this->select2("xpath=//tr[@class='addRow']/td/span/div/a", 'Sibling of', FALSE, TRUE);
- $this->click("xpath=//*[@id='crm-main-content-wrapper']/div/div/form/div/div[3]/table/tbody/tr[4]/td[2]/input[@type='checkbox']");
+ $this->select2("xpath=//div[@id='crm-main-content-wrapper']/div/div/form/div/div[4]/table/tfoot/tr/td/span/div/a",'Sibling of', FALSE, TRUE);
+ $this->click("xpath=//*[@id='crm-main-content-wrapper']/div/div/form/div/div[4]/table/tbody/tr[4]/td[2]/input[@type='checkbox']");
$this->click("xpath=//a[text()='Standard Timeline']");
$this->select2("xpath=//tr[@class='addRow']/td[contains(text(),'Add activity:')]/span/div/a", 'SMS', FALSE, TRUE);
$isDefault
);
- $this->waitForElementPresent("xpath=//table/tbody//tr/td[1][text()='{$financialAccountTitle}']/../td[9]/span/a[text()='Edit']");
+ $this->waitForElementPresent("xpath=//table/tbody//tr/td[1]/div[text()='{$financialAccountTitle}']/../../td[9]/span/a[text()='Edit']");
- $this->clickLink("xpath=//table/tbody//tr/td[1][text()='{$financialAccountTitle}']/../td[9]/span/a[text()='Edit']", '_qf_FinancialAccount_cancel-botttom', FALSE);
+ $this->clickLink("xpath=//table/tbody//tr/td[1]/div[text()='{$financialAccountTitle}']/../../td[9]/span/a[text()='Edit']", '_qf_FinancialAccount_cancel-botttom', FALSE);
//Varify Data after Adding new Financial Account
$verifyData = array(
'name' => $financialAccountTitle,
if ($orgNameEdit) {
$orgName = $orgNameEdit;
}
- $this->waitForElementPresent("xpath=//table/tbody//tr/td[1][text()='{$financialAccountTitle}']/../td[9]/span/a[text()='Edit']");
- $this->clickLink("xpath=//table/tbody//tr/td[1][text()='{$financialAccountTitle}']/../td[9]/span/a[text()='Edit']", '_qf_FinancialAccount_cancel-botttom', FALSE);
+ $this->waitForElementPresent("xpath=//table/tbody//tr/td[1]/div[text()='{$financialAccountTitle}']/../../td[9]/span/a[text()='Edit']");
+ $this->clickLink("xpath=//table/tbody//tr/td[1]/div[text()='{$financialAccountTitle}']/../../td[9]/span/a[text()='Edit']", '_qf_FinancialAccount_cancel-botttom', FALSE);
$verifyData = array(
'name' => $financialAccountTitle,
$verifySelectFieldData = array('financial_account_type_id' => $financialAccountType);
$this->_assertSelectVerify($verifySelectFieldData);
$this->click('_qf_FinancialAccount_cancel-botttom');
- $this->waitForElementPresent("xpath=//table/tbody//tr/td[1][text()='{$financialAccountTitle}']/../td[9]/span/a[text()='Delete']");
+ $this->waitForElementPresent("xpath=//table/tbody//tr/td[1]/div[text()='{$financialAccountTitle}']/../../td[9]/span/a[text()='Delete']");
//Delete Financial Account
$this->_testDeleteFinancialAccount($financialAccountTitle);
);
$this->waitForElementPresent('newFinancialType');
- $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$financialType[name]']/../td[7]/span/a[text()='Accounts']");
+ $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1]/div[text()='$financialType[name]']/../../td[7]/span/a[text()='Accounts']");
$this->waitForElementPresent('newfinancialTypeAccount');
foreach ($expected as $value => $label) {
}
$this->openCiviPage('admin/financial/financialType', 'reset=1', 'newFinancialType');
- $this->verifyText("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$financialType[name]']/../td[3]", 'Accounts Receivable,Banking Fees,Premiums,' . $financialType['name']);
- $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$financialType[name]']/../td[7]/span/a[text()='Accounts']");
+ $this->verifyText("xpath=id('ltype')/div/table/tbody/tr/td[1]/div[text()='$financialType[name]']/../../td[3]", 'Accounts Receivable,Banking Fees,Premiums,' . $financialType['name']);
+ $this->click("xpath=id('ltype')/div/table/tbody/tr/td[1]/div[text()='$financialType[name]']/../../td[7]/span/a[text()='Accounts']");
$this->waitForElementPresent('newfinancialTypeAccount');
$this->click("xpath=//div[@id='ltype']/div/table/tbody/tr/td[2][text()='Banking Fees']/../td[7]/span/a[text()='Edit']");
$this->waitForElementPresent('_qf_FinancialTypeAccount_next');
$this->click('_qf_Field_done-bottom');
$this->waitForText('crm-notification-container', "Custom field '{$customField}' has been saved.");
- $this->waitForElementPresent("xpath=//span[text()='$customField']");
- $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField']/../../td[8]/span/a@href"));
+ $this->assertTrue($this->isTextPresent($customField), 'Missing text: ' . $customField);
+ $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customField']/../../td[8]/span/a@href"));
$customFieldId = $customFieldId[1];
// create custom field - Integer
$this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Custom field '{$customField1}' has been saved.");
- $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField1']");
- $customFieldId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField1']/../../td[8]/span/a@href"));
+ $this->assertTrue($this->isTextPresent($customField1), 'Missing text: ' . $customField1);
+ $customFieldId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customField1']/../../td[8]/span/a@href"));
$customFieldId1 = $customFieldId1[1];
// create custom field - Number
$this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Custom field '{$customField2}' has been saved.");
- $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField2']");
- $customFieldId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField2']/../../td[8]/span/a@href"));
+ $this->assertTrue($this->isTextPresent($customField2), 'Missing text: ' . $customField2);
+ $customFieldId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customField2']/../../td[8]/span/a@href"));
$customFieldId2 = $customFieldId2[1];
// create custom field - "alphanumeric select"
$this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Custom field '{$customField9}' has been saved.");
- $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField9']");
- $customFieldId9 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField9']/../../td[8]/span/a@href"));
+ $this->assertTrue($this->isTextPresent($customField9), 'Missing text: ' . $customField9);
+ $customFieldId9 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customField9']/../../td[8]/span/a@href"));
$customFieldId9 = $customFieldId9[1];
// create custom field - Date
$this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Custom field '{$customField10}' has been saved.");
- $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField10']");
- $customFieldId10 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField10']/../../td[8]/span/a@href"));
+ $this->assertTrue($this->isTextPresent($customField9), 'Missing text: ' . $customField9);
+ $customFieldId10 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customField10']/../../td[8]/span/a@href"));
$customFieldId10 = $customFieldId10[1];
return array(
$this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText('crm-notification-container', "Custom field '{$customFieldName}' has been saved.");
- $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customFieldName']");
- $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customFieldName']/../../td[8]/span/a@href"));
+ $this->assertTrue($this->isTextPresent($customFieldName), 'Missing text: ' . $customFieldName);
+ $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customFieldName']/../../td[8]/span/a@href"));
$customFieldId = $customFieldId[1];
return $customFieldId;
}
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForText("crm-notification-container", "The rule '{$newRuleTitle}' has been saved.");
- $rgId = explode('&rgid=', $this->getAttribute("xpath=//div[@id='browseValues_Individual']//table/tbody//tr/td[text()='{$newRuleTitle}']/../td[3]/span/a[text()='Use Rule']@href"));
+ $rgId = explode('&rgid=', $this->getAttribute("xpath=//div[@id='browseValues_Individual']/div/div/table/tbody//tr/td[text()='{$newRuleTitle}']/../td[3]/span/a[1][text()='Use Rule']@href"));
$rgId = explode('&', $rgId[1]);
// Add Contact
$this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td");
$this->waitForText('crm-notification-container', "Custom field '{$customField}' has been saved.");
- $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField']/../../td[8]/span/a@href"));
+ $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$customField']/../../td[8]/span/a@href"));
$customFieldId = $customFieldId[1];
return array("custom_{$customFieldId}", $customField, $customGroupTitle);
$this->waitForText('crm-notification-container', "Custom field '{$dateFieldLabel}' has been saved.");
- $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$dateFieldLabel']");
- $dateFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$dateFieldLabel']/../../td[8]/span/a@href"));
+ $this->assertTrue($this->isTextPresent($dateFieldLabel), 'Missing text: ' . $dateFieldLabel);
+ $dateFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$dateFieldLabel']/../../td[8]/span/a@href"));
$dateFieldId = $dateFieldId[1];
// create another custom field - Integer Radio
//Is custom field created
$this->waitForText("crm-notification-container", "Custom field '$radioFieldLabel' has been saved.");
- $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$radioFieldLabel']/parent::td/parent::tr/td[8]/span/a");
- $radioFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$radioFieldLabel']/../../td[8]/span/a@href"));
+ $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$radioFieldLabel']/parent::td/parent::tr/td[8]/span/a");
+ $radioFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$radioFieldLabel']/../../td[8]/span/a@href"));
$radioFieldId = $radioFieldId[1];
// create another custom field - multiselect
$this->click('_qf_Field_done-bottom');
$this->waitForElementPresent('newCustomField');
$this->waitForText("crm-notification-container", "Custom field '{$multiSelectLabel}' has been saved.");
- $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$multiSelectLabel']/parent::td/parent::tr/");
- $multiSelectFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$multiSelectLabel']/parent::td/parent::tr/td[8]/span/a@href"));
+ $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$multiSelectLabel']/parent::td/parent::tr/");
+ $multiSelectFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$multiSelectLabel']/parent::td/parent::tr/td[8]/span/a@href"));
$multiSelectFieldId = $multiSelectFieldId[1];
// create another custom field - contact reference
$this->waitForElementPresent('newCustomField');
$this->waitForText("crm-notification-container", "Custom field '{$contactReferenceLabel}' has been saved.");
- $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$contactReferenceLabel']/parent::td/parent::tr/");
- $contactReferenceFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$contactReferenceLabel']/parent::td/parent::tr/td[8]/span/a@href"));
+ $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$contactReferenceLabel']/parent::td/parent::tr/");
+ $contactReferenceFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/div[text()='$contactReferenceLabel']/parent::td/parent::tr/td[8]/span/a@href"));
$contactReferenceFieldId = $contactReferenceFieldId[1];
$customDataParams = array(
$this->waitForElementPresent("_qf_Contribution_upload-bottom");
$this->select('contribution_status_id', 'value=3');
$this->click("_qf_Contribution_upload-bottom");
+ $this->waitForAjaxContent();
$this->waitForElementPresent("_qf_ContributionView_cancel-bottom");
$this->click("_qf_ContributionView_cancel-bottom");
// Fill Email Subject
$this->click("xpath=//div[@id='mainTabContainer']/ul/li[5]/a");
+ $this->waitForAjaxContent();
$this->type("email_subject", $emaiSubject);
// Fill Email To
// Is correct email Subject?
$this->click("xpath=//div[@id='mainTabContainer']/ul/li[5]/a");
+ $this->waitForAjaxContent();
$this->assertContains($emaiSubject, $this->getValue("email_subject"), "Email Subject expected $emaiSubject");
// Is correct email to?
//disable the logging
$this->openCiviPage('admin/setting/misc', 'reset=1');
+ $this->waitForElementPresent("xpath=//tr[@class='crm-miscellaneous-form-block-logging']/td[2]/label[text()='No']");
$this->click("xpath=//tr[@class='crm-miscellaneous-form-block-logging']/td[2]/label[text()='No']");
$this->click("_qf_Miscellaneous_next-top");
$this->waitForTextPresent("Changes Saved");