SilkTest base state unrecognized after consecutive tests run

混江龙づ霸主 提交于 2019-12-08 02:57:31

From the log file you posted, I can see that you are switching between testing eclipse.exe and iexplore.exe. The way your script is currently built it is either one or the other. This means that as soon as you switch to Internet Explorer, Silk Test is detaching from Eclipse and will no longer recognize the window.

Since you are starting your applications through other mechanisms anyway, I suggest the attach method, which is cumulative and will add the pattern instead of replacing it, so you'll avoid switching between the applications.

Desktop desktop = new Desktop();
desktop.attach("*\\eclipse.exe", TechDomain.SWT, TechDomain.XBROWSER, TechDomain.WIN32);
desktop.attach("*\\iexplore.exe", TechDomain.SWT, TechDomain.XBROWSER, TechDomain.WIN32);
Shell eclipse = desktop.find("/Shell[@caption='Java EE*']");
BrowserApplication browserApp = desktop.find("/BrowserApplication");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!