Forum Discussion
4 Replies
Sort By
- Hello Ian,Probably, there are some scripts on the page that make the check box behave not the way it is supposed to.To say something definite, I need to see the tested page. Save the page to an HTML file and send me the file:
- tppeguContributorI've encountered the same problem. My assumption was also that there were scripts on the page that interfere, although it never seems to happen during manual testing. In fact there are a few places where I have seen distinct differences in behaviour between a real mouse click and a TC simulated mouse click, and it's always in areas where there are event handlers in the page scripts. My guess is that whatever TC is doing to simulate clicks is not firing the right event handlers, or perhaps firing them in the wrong order.Anyway, the workaround I use for the problematic checkboxes is as follows (JScript):function ClickCheckbox(cb, state){if(cb.Exists){while(!cb.WaitProperty("checked", state, 500)){cb.Click();cb.Refresh();}}}There should really be a timeout or loop counter in there, as there is the possibility of an infinite loop, but in my case the problem always seems to be temporary, so this works fine for me.
- frysysNew ContributorThanks Tony,
This is a standard asp.net checkbox.
There is code behind the click event (which is what I am trying to test).
I will try your routine and let you know. Next Year :)
Thanks to everyone for responding - frysysNew ContributorThanks
That worked
Related Content
Recent Discussions
- 3 days agovladd1