From: jitendrapurohit Date: Thu, 19 Mar 2015 13:08:51 +0000 (+0530) Subject: webtest fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b87dcbda29075e9b14d65000045a3dc4c64436c2;p=civicrm-core.git webtest fix --- diff --git a/tests/phpunit/WebTest/Event/AddPricesetTest.php b/tests/phpunit/WebTest/Event/AddPricesetTest.php index 561b49b393..dbf85db342 100644 --- a/tests/phpunit/WebTest/Event/AddPricesetTest.php +++ b/tests/phpunit/WebTest/Event/AddPricesetTest.php @@ -196,7 +196,9 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase { $this->clickLink("//*[@id='price_set-{$sid}']/td[4]/span[1]/a[2]", '_qf_Preview_cancel-bottom'); // Check for expected price set field strings - $this->clickAt("xpath=//*[@class ='select2-chosen']"); + if ($this->isElementPresent("xpath=//*[@class ='select2-chosen']")) { + $this->clickAt("xpath=//*[@class ='select2-chosen']"); + } $this->assertStringsPresent($validateStrings); } @@ -709,7 +711,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase { // Enter Event Title, Summary and Description $this->select("event_type_id", "value=4"); $this->select("default_role_id", "value=1"); - $this->type("title", "Test Event"); + $this->type("template_title", "Test Event"); $this->type("summary", "This is a great conference. Sign up now!"); $this->click("_qf_EventInfo_upload-bottom");