Unable to Focus the Control
Are others out there experiencing random 'Unable to Focus the Control' errors? We've been experiencing them for some time now. A support ticket was entered in March and an unrelated patch seemed to fix the problem. However I now think closing and re-opening TestComplete was the actual fix.It seems to happen when using the 'Keys' operation on a field but does not happen everytime. The 'Keys' method is suppose to set the focus. The strange thing is the test can be re-started and the error doesn't happen. Various variations of wait (WaitChild, WaitAliasChild, WaitProperty, etc) are used to ensure controls are loaded throughout all of our tests.
Here's the code for this morning's failure (converted to script from keyword test):
function AddItemLimits() { KeywordTests.OpenItemLimitsPage.Run(); Aliases.browser.CribMaster.sectionPrimarycontent.CraftCode.sectionActionwrapper.sectionActioncontent.formMainform.panelPnlitemcraftcode.panelFullscreenShow.article.panelHalf.WaitAliasChild("CraftCode_e", 5000); Aliases.browser.CribMaster.sectionPrimarycontent.CraftCode.sectionActionwrapper.sectionActioncontent.formMainform.panelPnlitemcraftcode.panelFullscreenShow.article.panelHalf.CraftCode_e.Keys("0"); <=== FAILING HERE Aliases.browser.CribMaster.sectionPrimarycontent.CraftCode.sectionActionwrapper.sectionActioncontent.formMainform.panelPnlitemcraftcode.panelFullscreenShow.article.panelHalf.panel.panelFullscreen.header.tableEmployeefilterRb1.All.Click(); KeywordTests.LogNotificationException.Run("Error adding Item Limits"); KeywordTests.RemovePage.Run();
I re-ran the entire test suite a second time this morning which includes this code and it didnt' fail.
Any ideas? We've been using TC for more than a year and getting quite frustrated by the inconsistency with which tests run. I would estimate the success rate of running our test suite (5,000+ screen interactions) is less than 20%.
Firefox 39.0
TC 10.6.3387 (tcFFHook.xml dated 7/6/2015)