Sunday, 10 February 2013

OnSelect event handling on IE7 in selenium

I stuck in suite execution when i was running automation suite on IE 7. On further drill down i came to know that the application has one input element having onSelect attribute .


On selecting any text from input it fires onSelect event and does further processing.  In order to get rid from this problem , i did some research on this issue and found following solution.

1. Go to HTMLUTIL.JS file.
2. Open this file.
3. Find this line "element.fireEvent('on' + eventType, evt);"
4. Replace above line by following code block.

try
{
element.fireEvent('on' + eventType, evt);
}
catch(ex)
{

}
 

No comments:

Post a Comment