Fix for Webtest
[civicrm-core.git] / tests / phpunit / WebTest / Contact / RelationshipAddTest.php
index a9d0a6191479e8a28610f93942f094e4ad4fa622..0aa976045349b191912be57b5eb3bd46dcbb995e 100644 (file)
@@ -338,14 +338,14 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     //save the relationship
     //$this->click("_qf_Relationship_upload");
     $this->click("_qf_Relationship_upload-bottom");
-    $this->waitForElementPresent("crm-contact-relationship-selector-current_wrapper");
+    
 
     //check the status message
     $this->waitForText('crm-notification-container', 'Relationship created.');
 
-    $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
-    $this->click("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
-
+    $this->waitForElementPresent("xpath=//table[@id='DataTables_Table_2']/tbody/tr/td[9]/span/a[1][text()='View']");
+    $this->click("xpath=//table[@id='DataTables_Table_2']/tbody/tr[1]/td[9]/span/a[1][text()='View']");
     $this->webtestVerifyTabularData(
       array(
         'Description' => $description,
@@ -419,12 +419,12 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     //$this->click("_qf_Relationship_upload");
     $this->click('_qf_Relationship_upload-bottom');
     $this->waitForElementPresent("crm-contact-relationship-selector-current_wrapper");
-
+    
     //check the status message
     $this->waitForText('crm-notification-container', 'Relationship created.');
 
-    $this->waitForElementPresent("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
-    $this->click("xpath=//div[@id='crm-contact-relationship-selector-current_wrapper']//table/tbody//tr/td[9]/span/a[text()='View']");
+    $this->waitForElementPresent("xpath=//table[@id='DataTables_Table_2']/tbody/tr/td[9]/span/a[1][text()='View']");
+    $this->click("xpath=//table[@id='DataTables_Table_2']/tbody/tr[1]/td[9]/span/a[1][text()='View']");
 
     $this->webtestVerifyTabularData(
       array(