diff --git a/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php b/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php
index 3f44a049a2d03fc8349397f9ff5a9167713f88a5..e2c4fb8d8c9a375acda679770821d436a4dc8271 100644
--- a/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php
+++ b/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php
@@ -241,8 +241,9 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase {
     //View Contribution for separate contribution
     $this->waitForElementPresent("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']");
     // Open search criteria again
-    $this->click("xpath=id('Search')/x:div[2]/x:div/x:div[1]");
+    $this->click("xpath=id('Search')/div[2]/div/div[1]");
     $this->waitForElementPresent("financial_type_id");
+    $this->type("sort_name", $firstName);
     $this->select('financial_type_id',"label=Donation");
     $this->clickLink('_qf_Search_refresh', "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']");