Merge pull request #3614 from eileenmcnaughton/CRM-14951
[civicrm-core.git] / tests / phpunit / WebTest / Member / OnlineMembershipRenewTest.php
index fcf49e94430ec5a7fd0fd95b3aa5ac363350b05e..cdb31afe5ed9271268796052ff49dceb3efb83a3 100644 (file)
   */
 
 require_once 'CiviTest/CiviSeleniumTestCase.php';
+
+/**
+ * Class WebTest_Member_OnlineMembershipRenewTest
+ */
 class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
 
   protected function setUp() {
@@ -406,7 +410,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent('link=Add Membership Type');
     $this->waitForText('crm-notification-container', "The membership type 'Membership Type $title' has been saved.");
 
-    $url = $this->getAttribute("xpath=//div[@id='membership_type']//div[@class='dataTables_wrapper']//table/tbody//tr/td[1][text()='{$membershipTypeTitle}']/../td[12]/span/a[3][text()='Delete']/@href");
+    $url = $this->getAttribute("xpath=//div[@id='membership_type']//div[@id='option11_wrapper']//table/tbody//tr/td[1][text()='{$membershipTypeTitle}']/../td[12]/span/a[3][text()='Delete']/@href");
 
     $matches = array();
     preg_match('/id=([0-9]+)/', $url, $matches);
@@ -459,7 +463,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->click('link=Title');
     $this->waitForElementPresent('_qf_Settings_cancel-bottom');
     $this->click('is_organization');
-    $this->select('onbehalf_profile_id', "value=9");
+    $this->select("xpath=//input[@id='onbehalf_profile_id']/parent::td/div/div/span/select", "value=9");
     $this->type('for_organization', "On behalf $hash");
     $this->click('_qf_Settings_next-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());