Our project screens are having around 20 objects(HtmlTextField, HtmlPopupList, HtmlPushButton) in each. I have stored all the controls into one separate include file. The pbm is sometimes Silktest couldn't click/verify at some places. So I'm thinking about TypeKeys methods. Already some scripts are made by using Typekeys... What do you think, Which one is best to implement in this situation..?
One of my rules of thumb is if all else fails, use TypeKeys(). Or as the developer who trained me on SilkTest used to say when I had problems with Silk not finding controls: "TypeKeys is your friend." [img]images/icons/smile.gif[/img]
There's not much else you can do if it can't find the recorded controls, or only finds them sporadically. I find that in some cases if I run a test alone it will work, but if I run it with a suite of tests Silk can't find the control. When that's the case, I use TypeKeys().
I get an uneasy feeling in my stomach when behavior is erratic like that. I want to know WHY it is behaving that way. If Silk knows about the control, and the control is there, then it should be able to manipulate it. I'd look at the declaration for the control and then get the script to run to that point where it is not recognized and then take another declaration and see if they compare.
I recently found a situation like that where a screen displays with an extra "wrapper layer" around the controls if I use IE 6 rather than IE 5x. Strange, but true, and as soon as I allowed for that in the declarations and the script, it runs smoothly.
Thanks for your replies. I'm using IE6_DOM. Sometimes Silktest couldn't recognize the control, even the control exists in the corresponding browser window. I'm also planning to compatibility testing for different browsers.