webtestLogin(); $this->waitForPageToLoad($this->getTimeoutMsec()); // Advanced Search $this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh'); $this->click('_qf_Advanced_refresh'); $this->waitForElementPresent("xpath=//div[@id='search-status']/table/tbody/tr[2]/td[2]/input[1]"); $this->click("xpath=//div[@id='search-status']/table/tbody/tr[2]/td[2]/input[1]"); $this->select('task', "label=Register participants for event"); // Select event. Based on label for now. $this->waitForElementPresent('event_id'); $this->select2('event_id', "Rain-forest Cup Youth Soccer Tournament"); // Select role $this->multiselect2('role_id', array('Volunteer')); // Select participant status $this->select('status_id', 'value=1'); // Setting registration source $this->type('source', 'Event StandaloneAddTest Webtest'); $this->assertElementContainsText('css=tr.crm-participant-form-block-source span.description', 'Source for this registration (if applicable).'); // Clicking save. $this->click('_qf_Participant_upload-bottom'); $this->waitForPageToLoad($this->getTimeoutMsec()); } }