We have web ui project in MVC and for automated testing we are using Selenium, its a brilliant tool. But I am facing some problem in raising events with Selenium.
Scenario: I have a textbox which expects +ve value and bubbles up an error (javascript) when entered any -ve value and we hit tab from that textbox or clicked outside anywhere on the page.
It works fine with normal user interaction with the website but when using selenium I am not able achieve this behaviour. I am putting some text with Selenium.Type('elementId',-ve value) the event doesn't gets fired and the error doesnt bubbles up.
I tried using FireEvent("textboxId","blur") but its not working. The only work around is Focus on the textbox, add some value, use FireEvent("textbox","blur") and then Focus on some other textbox.
Has anyone got any idea to resolve this?