fireEvent/onblur IE11 problem
Posted: Wed Aug 12, 2015 1:42 pm
We are using multiple input fields for data on heavily scripted webclient (multiple functions are processing input data).
Internet Explorer 11, Windows 7 64-bit, Ranorex 5.3.2.23378.
Entering input text through:
sets value correctly, but following code
doesn't seem to actually fire onblur event - so the attached functions are not processing the value.
I have tested running simple javascript code (bookmarklet) on the same webpage:
onblur is fired correctly and value is processed by functions.
I am not sure if RaiseEvent is actually supposed to do what I am expecting it to do (same thing as fireEvent) - it doesn't actually fire event on simple code like:
Am I missing something or doing it wrong? Or is there some other way to utilize fireEvent in Ranorex?
Internet Explorer 11, Windows 7 64-bit, Ranorex 5.3.2.23378.
Entering input text through:
Code: Select all
inputIDtest.Element.SetAttributeValue("Value", "testvalue")
Code: Select all
inputIDtest.RaiseEvent("onblur")
I have tested running simple javascript code (bookmarklet) on the same webpage:
Code: Select all
inputs.namedItem('inputIDtest').value = "testvalue"
inputs.namedItem('inputIDtest').fireEvent('onblur')
I am not sure if RaiseEvent is actually supposed to do what I am expecting it to do (same thing as fireEvent) - it doesn't actually fire event on simple code like:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>script</title>
<script type="text/javascript">
function MoveOut() {
document.getElementsByTagName('input').namedItem('inputIDtest').innerText = "ONBLUR FIRED";
}
function MoveIn() {
document.getElementsByTagName('input').namedItem('inputIDtest').innerText = "ONFOCUS FIRED";
}
</script>
</head>
<body>
<p>Test input: <input id="inputIDtest" type="text" onblur="MoveOut()" onfocus="MoveIn()"></p>
</body>
</html>