webtestLogin(); $this->openCiviPage("admin/component", "action=add&reset=1"); // fill component name. $componentName = 'ComponentName_' . substr(base_convert(rand(), 10, 36), 0, 7); $this->type("name", $componentName); // fill component type $this->click("component_type"); $this->select("component_type", "value=Header"); // fill subject $subject = "This is subject for New Mailing Component."; $this->type("subject", $subject); // fill no text message // fill no html message $this->click("is_default"); // Clicking save. $this->click("_qf_Component_next"); $this->waitForPageToLoad($this->getTimeoutMsec()); // Is status message correct. $status = "Please provide either HTML or TEXT format for the Body."; $this->waitForText('crm-notification-container', $status); // Verify the error text. $this->assertTrue($this->isElementPresent("xpath=//table/tbody//tr/td[2]/span[text()='{$status}']"), "The row doesn't consists of proper component details"); } }