CRM-18454: webtest fixes
[civicrm-core.git] / tests / phpunit / WebTest / Contribute / ContributionPageAddTest.php
index 377e79fde7823d664d1576fac9f745a2371ec4b6..9263fade25c051c831f97d973a3cd2b553a27d0e 100644 (file)
@@ -259,8 +259,9 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("financial_type_id");
     $this->type("sort_name", $firstName);
     $this->select('financial_type_id', "label=Donation");
-    $this->clickLink('_qf_Search_refresh', "xpath=//table[@class='selector row-highlight']/tbody/tr/td[10]/span//a[text()='View']", FALSE);
-    $this->click("xpath=//div[@id='contributionSearch']/table[@class='selector row-highlight']/tbody/tr/td[10]/span//a[text()='View']");
+    $this->clickLink('_qf_Search_refresh', "xpath=//table[@class='selector row-highlight']/tbody/tr/td[4][text()='Donation']/../td[10]/span//a[text()='View']", FALSE);
+    $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr/td[4][text()='Donation']/../td[10]/span//a[text()='View']");
+    $this->waitForElementPresent("xpath=//table/tbody/tr/td[text()='From']/following-sibling::td");
     $this->waitForAjaxContent();
     $expected = array(
       'From' => "{$firstName} {$lastName}",