$this->openCiviPage('admin/custom/group/field/add', "reset=1&action=add&gid=$gid");
$textFieldLabel = 'test_text_field';
$this->click("header");
+ $this->waitForElementPresent('label');
$this->type("label", $textFieldLabel);
$this->click("_qf_Field_next_new-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->click("//option[@value='CheckBox']");
$checkboxFieldLabel = 'test_checkbox';
+ $this->waitForElementPresent('label');
$this->type("label", $checkboxFieldLabel);
$checkboxOptionLabel1 = 'check1';
$this->type("option_label_1", $checkboxOptionLabel1);
//add custom field - alphanumeric text
$textFieldLabel = 'test_text_field';
$this->click("header");
+ $this->waitForElementPresent('label');
$this->type("label", $textFieldLabel);
$this->clickLink("_qf_Field_next_new-bottom");
$this->click("//option[@value='Radio']");
$radioFieldLabel = 'test_radio';
+ $this->waitForElementPresent('label');
$this->type("label", $radioFieldLabel);
$radioOptionLabel1 = 'radio1';
$this->type("option_label_1", $radioOptionLabel1);
//click on save
$this->click('_qf_ScheduleReminders_next-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
-
+ $this->waitForElementPresent("xpath=//div[@id='reminder']/div/table/tbody//tr/td[1]/div[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');
public function testDefaultCountryIsEnabled() {
$this->webtestLogin();
$this->openCiviPage("admin/setting/localization", "reset=1");
- $this->addSelection("countryLimit-t", "label=UNITED STATES");
- $this->click("//select[@id='countryLimit-t']/option");
- $this->click("//input[@name='remove' and @value='<< Remove' and @type='button' and @onclick=\"QFAMS.moveSelection('countryLimit', this.form.elements['countryLimit-f[]'], this.form.elements['countryLimit-t[]'], this.form.elements['countryLimit[]'], 'remove', 'none'); return false;\"]");
- $this->addSelection("countryLimit-f", "label=AFGHANISTAN");
- $this->removeSelection("countryLimit-f", "label=AFGHANISTAN");
- $this->addSelection("countryLimit-f", "label=CAMBODIA");
- $this->removeSelection("countryLimit-f", "label=CAMBODIA");
- $this->addSelection("countryLimit-f", "label=CAMEROON");
- $this->removeSelection("countryLimit-f", "label=CAMEROON");
- $this->addSelection("countryLimit-f", "label=CANADA");
- $this->click("//input[@name='add' and @value='Add >>' and @type='button' and @onclick=\"QFAMS.moveSelection('countryLimit', this.form.elements['countryLimit-f[]'], this.form.elements['countryLimit-t[]'], this.form.elements['countryLimit[]'], 'add', 'none'); return false;\"]");
+ $this->addSelection("countryLimit", "label=UNITED STATES");
+ $this->click("//select[@id='countryLimit']/option");
+ $this->click("//input[@name='remove']");
+ $this->addSelection("countryLimit", "label=AFGHANISTAN");
+ $this->removeSelection("countryLimit", "label=AFGHANISTAN");
+ $this->addSelection("countryLimit", "label=CAMBODIA");
+ $this->removeSelection("countryLimit", "label=CAMBODIA");
+ $this->addSelection("countryLimit", "label=CAMEROON");
+ $this->removeSelection("countryLimit", "label=CAMEROON");
+ $this->addSelection("countryLimit", "label=CANADA");
+ $this->click("//input[@name='add']");
$this->click("_qf_Localization_next-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
try {
$id = $this->urlArg('id');
$this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody/tr[1]/td[2]");
- $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody/tr[1]/td[2]//a[text()='{$subject}']");
+ $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody/tr[1]/td[2]/div[text()='{$subject}']/../../td[8]/a[1]");
$this->waitForElementPresent('ActivityView');
$this->waitForElementPresent("css=table#crm-activity-view-table tr.crm-case-activityview-form-block-groupTitle");
$this->assertElementContainsText('crm-activity-view-table', "$textField");
- $this->click("xpath=//span[@class='ui-button-icon-primary ui-icon ui-icon-closethick']");
+ $this->click("xpath=//span[@class='ui-button-icon-primary ui-icon fa-times']");
$this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody/tr[1]/td[2]");
- $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody//tr/td[2]/a[text()='{$subject}']/../../td[6]/div[text()='Scheduled']");
+ $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody//tr/td[2]/div[text()='{$subject}']/../../td[7]/div[text()='Scheduled']");
- $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody//tr/td[2]/a[text()='{$subject}']/../../td[6]/div/form/select");
+ $this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody//tr/td[2]/div[text()='{$subject}']/../../td[7]/div/form/select");
// change activity status
- $this->select("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody//tr/td[2]/a[text()='{$subject}']/../../td[6]/div/form/select", 'value=2');
- $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody//tr/td[2]/a[text()='{$subject}']/../../td[6]/div/form/button[@type='submit']");
+ $this->select("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody//tr/td[2]/div[text()='{$subject}']/../../td[7]/div/form/select", 'value=2');
+ $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id . "']/tbody//tr/td[2]/div[text()='{$subject}']/../../td[7]/div/form/button[@type='submit']");
$this->openCiviPage('case', 'reset=1');
$this->click("xpath=//table[@class='caseSelector']/tbody//tr/td[2]/a[text()='{$contactName}']/../../td[9]/span/a[text()='Manage']");
$this->waitForElementPresent('_qf_CaseView_cancel-bottom');
$id2 = $this->urlArg('id');
$this->waitForElementPresent("xpath=//div[@id='activities']//table[@id='case_id_" . $id2 . "']/tbody/tr[1]/td[2]");
- $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id2 . "']//a[text()='{$subject}']");
+ $this->click("xpath=//div[@id='activities']//table[@id='case_id_" . $id2 . "']/tbody//tr/td[2]/div[text()='{$subject}']/../../td[8]/a[1]");
$this->waitForElementPresent('ActivityView');
$this->waitForElementPresent("css=table#crm-activity-view-table tr.crm-case-activityview-form-block-groupTitle");
}
$this->click("//div[@id='addMoreAddress1']/a/span");
$this->waitForElementPresent("address_2_street_address");
$this->type("address_2_street_address", "121 Sherman Street #15");
+ $this->waitForElementPresent("address_2_city");
$this->type("address_2_city", "Birmingham");
$this->type("address_2_postal_code", "3456");
$this->select("address_2_state_province_id", "value=1002");
$this->click("//div[@id='addMoreAddress3']/a/span");
$this->waitForElementPresent("address_4_street_address");
$this->type("address_4_street_address", "121 SW Sherman Way Suite 15");
+ $this->waitForElementPresent("address_4_city");
$this->type("address_4_city", "Birmingham");
$this->type("address_4_postal_code", "5491");
$this->assertSelected('address_4_country_id', "UNITED STATES");
'title' => 'Memberships',
'fields' => array(
'Membership Type' => array(
- 'type' => 'multiselect2',
+ 'type' => 'select2',
'locator' => 'membership_type_id',
'values' => array(array('General', 'Student')),
),
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->assertTrue(TRUE, 'greater than or equal to "{$Pdate}" AND less than or equal to "{$Ndate}"');
$value = "$lastNameSoft, $firstNameSoft";
+ $this->waitForElementPresent("xpath= id('rowid{$cid}')/td[3]/a");
$this->verifyText("xpath= id('rowid{$cid}')/td[3]/a", preg_quote($value));
}
// ...need to use mouseDownAt on first result (which is a li element), click does not work
$this->clickAt("xpath=//div[@class='select2-result-label']");
- sleep(2);
- $this->waitForElementPresent("//div[@id='Tag']/div[2]/div/div/ul/li/div[text()='tagset1']");
+ $this->waitForElementPresent("//div[@id='Tag']/div[2]/div/div/ul/li[1]/div[text()='tagset1']");
$this->click("xpath=//div[@id='Tag']/div[2]/div/div/ul/li[2]/input");
$this->keyDown("xpath=//div[@id='Tag']/div[2]/div/div/ul/li[2]/input", " ");
$this->type("xpath=//div[@id='Tag']/div[2]/div/div/ul/li[2]/input", 'tagset2');
$this->waitForElementPresent("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]");
$createdBy = $this->getText("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td[3]/a");
$this->click("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td[7]/span/a[2]");
- $this->waitForElementPresent("xpath=//form[@id='Edit']/div[2]/div/table/tbody/tr[2]/td[contains(text(), '{$createdBy}')]");
+ $this->waitForElementPresent("xpath=//form[@id='Edit']/div[2]/div/table[1]/tbody/tr[2]/td[contains(text(), '{$createdBy}')]");
$this->openCiviPage('group', 'reset=1');
//search groups using created by
$this->waitForText('crm-notification-container', "Contact Saved");
$this->openCiviPage('group', 'reset=1');
- $this->waitForElementPresent("xpath=//a/span[text()='Add Group']");
+ $this->waitForElementPresent("xpath=//div[@id='crm-main-content-wrapper']/div[@class='crm-submit-buttons']/a/span[text()=' Add Group']");
$this->waitForElementPresent("xpath=//table[@id='DataTables_Table_0']/tbody//tr/td[1]/span[contains(text(), '{$group}')]");
$this->click("xpath=//table[@id='DataTables_Table_0']/tbody//tr/td[1]/span[text()='{$group}']/../../td[7]/span[1]/a[1]");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->assertTrue($this->isTextPresent("The tag '$tagSetName' has been saved."));
// sort by ID desc
- $this->click("xpath=//div[@id='cat']/div/table/thead/tr/th[2]/div[text()='ID']");
+ $this->click("xpath=//table[@class='display dataTable no-footer']/thead/tr/th[2]/div[text()='ID']");
$this->waitForElementPresent("css=table.display tbody tr td");
// verify text