/**
*/
- function webtestFillAutocomplete($sortName) {
- $this->click('contact_1');
- $this->type('contact_1', $sortName);
- $this->typeKeys('contact_1', $sortName);
+ function webtestFillAutocomplete($sortName, $fieldName = 'contact_1') {
+ $this->click($fieldName);
+ $this->type($fieldName, $sortName);
+ $this->typeKeys($fieldName, $sortName);
$this->waitForElementPresent("css=div.ac_results-inner li");
$this->click("css=div.ac_results-inner li");
- $this->assertContains($sortName, $this->getValue('contact_1'), "autocomplete expected $sortName but didn’t find it in " . $this->getValue('contact_1'));
+ $this->assertContains($sortName, $this->getValue($fieldName), "autocomplete expected $sortName but didn’t find it in " . $this->getValue($fieldName));
}
/**
$this->type("trxn_id", "P20901X1" . rand(100, 10000));
// soft credit
- $this->click("soft_credit_contact_1");
- $this->type("soft_credit_contact_1", $softCreditFname);
- $this->typeKeys("soft_credit_contact_1", $softCreditFname);
- $this->waitForElementPresent("soft_credit_amount_1");
+ $this->webtestFillAutocomplete("{$softCreditLname}, {$softCreditFname}", 'soft_credit_contact_1');
//Additional Detail section
$this->click("AdditionalDetail");