Fix id of custom date field
$day = date('j', $timeStamp);
if (!$multiselect) {
- $this->click($dateElement);
+ $this->click("xpath=//input[@id='{$dateElement}']/following-sibling::input");
}
$this->waitForElementPresent("css=div#ui-datepicker-div.ui-datepicker div.ui-datepicker-header div.ui-datepicker-title select.ui-datepicker-month");
$this->select("css=div#ui-datepicker-div.ui-datepicker div.ui-datepicker-header div.ui-datepicker-title select.ui-datepicker-month", "value=$mon");
case 'string':
if ($val && substr($val, 0, 5) == 'date:') {
$val = date('m/d/Y', strtotime(trim(substr($val, 5))));
- $item = "xpath=//input[starts-with(@id, '{$item}_display_')]";
+ $item = "xpath=//input[@id='{$item}']/following-sibling::input";
}
if ($val) {
$this->assertElementValueEquals($item, $val);