Start migrating to use clickLink method
[civicrm-core.git] / tests / phpunit / WebTest / Event / PCPAddTest.php
index 5e83bb3805f888da5e4b01795f3dd22c7eb0b8f1..340e8486c367b0dd276e4525f310575b3c033c06 100644 (file)
@@ -436,10 +436,7 @@ class WebTest_Event_PCPAddTest extends CiviSeleniumTestCase {
     $this->click("_qf_Search_refresh");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->click("xpath=//div[@id='participantSearch']/table/tbody//tr/td[@class='crm-participant-sort_name']/a[text()='{$sortName}']/../../td[11]/span/a[text()='View']");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
-
-    $this->waitForElementPresent("xpath=//table[@class='selector']/tbody/tr/td[8]/span/a[text()='View']");
+    $this->clickLink("xpath=//div[@id='participantSearch']/table/tbody//tr/td[@class='crm-participant-sort_name']/a[text()='{$sortName}']/../../td[11]/span/a[text()='View']", "xpath=//table[@class='selector']/tbody/tr/td[8]/span/a[text()='View']");
     $this->click("xpath=//table[@class='selector']/tbody/tr/td[8]/span/a[text()='View']");
     $this->waitForPageToLoad($this->getTimeoutMsec());