Webtests Fixes
authorWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 9 Jan 2015 13:09:34 +0000 (18:39 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Fri, 9 Jan 2015 13:09:34 +0000 (18:39 +0530)
12 files changed:
tests/phpunit/CiviTest/CiviSeleniumTestCase.php
tests/phpunit/WebTest/Admin/Form/ScheduleReminderTest.php
tests/phpunit/WebTest/Case/ActivityToCaseTest.php
tests/phpunit/WebTest/Case/AddCaseTypeTest.php
tests/phpunit/WebTest/Financial/FinancialAccountTest.php
tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php
tests/phpunit/WebTest/Import/AddressImportTest.php
tests/phpunit/WebTest/Import/ContactCustomDataTest.php
tests/phpunit/WebTest/Import/CustomDataTest.php
tests/phpunit/WebTest/Pledge/AddCancelPaymentTest.php
tests/phpunit/WebTest/Report/AddTest.php
tests/phpunit/WebTest/Report/LoggingReportTest.php

index 7bc484bcd4621828bb69c647c59de1a987702ce6..ba7bcfb8d1b06ad26882241217c5a340488ff38c 100644 (file)
@@ -1832,8 +1832,8 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
       $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) {
@@ -1904,7 +1904,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
    * 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');
@@ -1944,9 +1944,9 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
     $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");
@@ -1957,7 +1957,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
       $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']);
index d94181b053a5ebcad803c7ad6ce2fc955e79af88..9f6e4c3185e0cab15372c86579df80bf35b6fe22 100644 (file)
@@ -65,7 +65,7 @@ class WebTest_Admin_Form_ScheduleReminderTest extends CiviSeleniumTestCase {
     $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'));
index 6133c2f106676adeb3bacaf3e6de0cb8ef4924b1..01e310ef023e838c3636dbc063dd092decd0bc0a 100644 (file)
@@ -406,7 +406,7 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase {
 
     //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");
index 988209b178c8751b182925c445f88073e194ff40..b2e6811df719515e288989c12e6dcab2da3b7342 100644 (file)
@@ -127,8 +127,8 @@ class WebTest_Case_AddCaseTypeTest extends CiviSeleniumTestCase {
     $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);
index b9eb423494b5f9ce026583de6b40088452d724f7..6c2cb67358bbe37704e1673a241cc9e49d22cc04 100644 (file)
@@ -68,9 +68,9 @@ class WebTest_Financial_FinancialAccountTest extends CiviSeleniumTestCase {
       $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,
@@ -117,8 +117,8 @@ class WebTest_Financial_FinancialAccountTest extends CiviSeleniumTestCase {
     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,
@@ -136,7 +136,7 @@ class WebTest_Financial_FinancialAccountTest extends CiviSeleniumTestCase {
     $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);
index 7e0f209275ee2d536a03af23f5fbd211157e9816..2a7f5102e7b66933e1a70d38322fe3c7ae0ff9c9 100644 (file)
@@ -65,7 +65,7 @@ class WebTest_Financial_FinancialAccountTypeTest extends CiviSeleniumTestCase {
     );
 
     $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) {
@@ -73,8 +73,8 @@ class WebTest_Financial_FinancialAccountTypeTest extends CiviSeleniumTestCase {
     }
 
     $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');
index 96067f6dbe4ea49b62ca6d90201af43ebe3685fd..9cca856ead948e2804371e3abe72b44c97925bca 100644 (file)
@@ -142,8 +142,8 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $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
@@ -157,8 +157,8 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $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
@@ -172,8 +172,8 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $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"
@@ -223,8 +223,8 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $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
@@ -239,8 +239,8 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $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(
@@ -307,8 +307,8 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $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;
   }
index 2a71a658bc60f9968be51aeb13fb20696f742c9d..e5f715d8ccd15f16e985ddbe2f30f88df25fbf48 100644 (file)
@@ -57,7 +57,7 @@ class WebTest_Import_ContactCustomDataTest extends ImportCiviSeleniumTestCase {
     $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
@@ -185,7 +185,7 @@ class WebTest_Import_ContactCustomDataTest extends ImportCiviSeleniumTestCase {
     $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);
index 95b6a608c00d6c58c3eb5d607b2443e19e1585e7..3a76a82b597b53a40ad36b75fed6bba291a35102 100644 (file)
@@ -211,8 +211,8 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase {
 
     $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
@@ -252,8 +252,8 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase {
 
     //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
@@ -291,8 +291,8 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase {
     $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
@@ -317,8 +317,8 @@ class WebTest_Import_CustomDataTest extends ImportCiviSeleniumTestCase {
     $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(
index be0068e19ee1bebed87931a6aff6348aef2af620..6bfa287917f8cf1168ccfc10157bfea48c522105 100644 (file)
@@ -101,6 +101,7 @@ class WebTest_Pledge_AddCancelPaymentTest extends CiviSeleniumTestCase {
     $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");
 
index 3c4ac58bf7ceeb8a4420c6bc29195f6fc4f13589..6c99eaf30df5cc9fc0330e63f6e8a99c24ca26b4 100644 (file)
@@ -105,6 +105,7 @@ class WebTest_Report_AddTest extends CiviSeleniumTestCase {
 
     // Fill Email Subject
     $this->click("xpath=//div[@id='mainTabContainer']/ul/li[5]/a");
+    $this->waitForAjaxContent();
     $this->type("email_subject", $emaiSubject);
 
     // Fill Email To
@@ -173,6 +174,7 @@ class WebTest_Report_AddTest extends CiviSeleniumTestCase {
 
     // 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?
index a8355a3b4900b28c83e0a66bcfe690bd8c54ae22..36c84cfd06440923f37af7dfbc4da6e38dd0d144 100644 (file)
@@ -266,6 +266,7 @@ class WebTest_Report_LoggingReportTest extends CiviSeleniumTestCase {
 
     //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");