Merge pull request #9773 from monishdeb/CRM-19663
[civicrm-core.git] / tests / phpunit / WebTest / Mailing / AddMessageTemplateTest.php
index a5aa507134279d74dafacbc6b55670a965bee267..e6142f402b0ec48a8d6a0cd5197a11a5a4ff3be3 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -80,10 +80,10 @@ class WebTest_Mailing_AddMessageTemplateTest extends CiviSeleniumTestCase {
     $this->waitForText('crm-notification-container', "The Message Template '$msgTitle' has been saved.");
 
     // Verify text.
-    $this->assertTrue($this->isElementPresent("xpath=id('user')/div[2]/div[1]/table/tbody//tr/td[1][contains(text(), '$msgTitle')]"),
+    $this->assertTrue($this->isElementPresent("xpath=id('user')//div//div/table[@class='display dataTable no-footer']/tbody//tr/td[1][contains(text(), '$msgTitle')]"),
       'Message Template Title not found!');
     if (!$useTokens) {
-      $this->assertTrue($this->isElementPresent("xpath=id('user')/div[2]/div[1]/table/tbody//tr/td[2][contains(text(), '$msgSubject')]"),
+      $this->assertTrue($this->isElementPresent("xpath=id('user')//div//div/table[@class='display dataTable no-footer']/tbody//tr/td[2][contains(text(), '$msgSubject')]"),
         'Message Subject not found!');
     }
   }