Quick (and probably simple question) from a
ST newbie. I've set up a simple script which
selects an item from a HtmlPopupList which
it appears to do properly, and afterwards ST
give me an error saying the control wasn't
responding, when from all outward appearances
it behaved as expected.
I'm sure someone's seen this and it's a quick
This happens to me periodically and it seems that SilkTest makes the system unstable or something after a while and if I shutdown and restart the browser, the problem goes away...Weird. I can't tell if this is a SilkTest bug, browser bug or windows bug. I think it could be a windows bug to be honest. It's like SilkTest uses the win32 Api to send mouse clicks and menu picks etc to windows objects but somehow or another the win32 api call returns with some error code like "control not responding" so what the heck is SilkTest supposed to do? It probably recalls the win32api again several times and after some set number of failures or timeout, silktest gives up and throws a "Control Not Responding" exception for your testcase.
There seems to be a couple workarounds that people use. Mine is restarting the browser occasionally, you can catch this exception "control not responding", then test for it and if it occurs, shutdown, restart the browser and retry the testcase.
//your test code here
//i.e. HtmlPopupList.Select("item one")
LogError("Control Not responding error...restarting browser as workaround")
Another workaround is ensuring that the object is fully visible and detected by SilkTest agent, for example sometimes a control is beyone the view of the browser requiring a scroll down or right or something. Try:
BrowserPage.Typekeys("<Ctrl-End>") do scroll all the way to the bottom of the page or send pagedown or whatever key presses necessary.
I hope this helps. To be honest, I still haven't figured out all the quirks and oddness of SilkTest with webapps, half the time it's a guessing game where you have to workaround some weird stupid behavior.
Put this line of code at the top. This was a work around from Segue. I have not had the this problem happen to me since. You can find more info in the help. Do a search under FIND: control is not responding
[ ] Agent.SetOption(OPT_VERIFY_RESPONDING, FALSE)
[This message has been edited by crazyram (edited 12-11-2000).]
You may also be running in to a known defect with HtmlPopupLists objects. This has been fixed in 5.5 and may be fixed in 5.03.2.
Another workround for problems with web pages is to do a Desktop.GetChildren (), then a Browser.GetChildren (), then continue the script. Just throw away the return values. This will sometimes get SilkTest back in sync with the browser.