The website displays a list and has a filter input box that updates the list as you type in it. The Filter doesn't update if you just set the value of the input box with COM/Javascript.
In IE the below code would make it update
Code: Select all
;Filter field to search for properties
AddressSearchField := WB.document.getElementById("filterInput")
;filter properties with start of address
AddressSearchField.value := "test"
;fire event to update search results.
event := WB.document.createEvent("Event")
event.initEvent("input", true, true)
AddressSearchField.dispatchEvent(event)
Code: Select all
PageInst.Evaluate("document.getElementById(""filterInput"").value = '" . "test" . "'") ;this succesfully sets the value
JS := "var event = document.createEvent('Event');"
. "event.initEvent('input',true,true);"
. "document.getElementById(""filterInput"").dispatchEvent(event);"
PageInst.Evaluate(JS) ; this doesn't update the list
Code: Select all
JS := "setTimeout(function(){ document.getElementById(""filterInput"").focus(); }, 500);"
PageInst.Evaluate(JS)
Send , {Enter}
if anyone has any ideas of what i could try i would be greatly appreciative.
thanks Grimboto