I have a select box which has an event listener on it:
$(document).ready(function () {
$('#edit-era-code-select').change(function() {
$.ajax({
url: Drupal.settings.basePath+'era/js',
type: 'POST',
data: "era_code_select="+$(this).val(),
context: document.body,
success: function(){
window.location.reload(true);
}
});
});
});
It will works fine when using it in ie/ff/... When doing selenium tests using phpunit it I can see the selectbox being changed but it does not trigger the jquery event change. It only happens in IE. Here is the code that does the command:
AbstractSeleniumTestCaseIexplore::loginShib ( $user ['uid'] );
$this->waitForElementPresent("//select[@id='edit-era-code-select']", 30000);
$code = $this->getSelectedLabel("//select[@id='edit-era-code-select']");
if ($code != 3333) {
$this->select("edit-era-code-select", "label=3333");
$this->waitForPageToLoad("30000");
}
...
Can anyone help?