Forum Discussion
Hi,
As far as I can see from the screenshot, when TestComplete tries to set a focus to the combo box, the application handles this and sets the focus to the WinFormsObject("buttonFindLibItems") object. It is difficult to understand why this happens without the tested application. Could you please send us the application under test and the test project you are using via the Contact Support form?
- roytberA7 years agoOccasional Contributor
Hi,
I am having the same issue now, the object got focus and the test is running fine but the error message says "Unable to find the object SetFocus. "
When using SetFocus() with window(code below), there is no error message.
Aliases.browser.BrowserWindow3.SetFocus();
Here is my code, I have tried the solution mentioned in this post. The delay doesn't work, and FullName is the name of the object that got focused. How do I disable the error message??
aqUtils.Delay (2000, "delay to click");
globalObjects.chooseAfile.SetFocus();
Log.Message(Sys.Desktop.FocusedWindow().FullName);- tristaanogre7 years agoEsteemed Contributor
roytberA wrote:
Hi,
I am having the same issue now, the object got focus and the test is running fine but the error message says "Unable to find the object SetFocus. "
When using SetFocus() with window(code below), there is no error message.
Aliases.browser.BrowserWindow3.SetFocus();
Here is my code, I have tried the solution mentioned in this post. The delay doesn't work, and FullName is the name of the object that got focused. How do I disable the error message??
aqUtils.Delay (2000, "delay to click");
globalObjects.chooseAfile.SetFocus();
Log.Message(Sys.Desktop.FocusedWindow().FullName);Note that the OP is a different general source of the issue and is also 4 years old. There have been numerous updates to TestComplete since then as well as different ways of handling things. The original post is in a desktop application where as your situation seems to involve web applications.
I have a question concerning your post... you are trying to set focus on the browser window instead of some component or page within your web application. What are you intending to achieve? Please describe what you are trying to implement and any information such as application type (WEB vs Desktop), technologies used in the app, screenshots of the objects in question using Object Spy and/or object browser, etc.
- roytberA7 years agoOccasional Contributor
Hi Robert,
Thank you for your respond.
My question now is, does SetFocus method work with Window Object or only work with BrowserWindow? I tried using it with other objects on other page, and it also log error "unable to find the object SetFocus. Seems to me it only works with BrowserWindow... or I am doing something wrong here.
To answer your questions in italic...
What are you intending to achieve? I am trying to SetFocus on the objcet "Aliases.browser.pageConfirm.cellPopupm.table.cellNoticnconttablebx.table" which happens after another window get closed(a popup window for confirmation which get closed when click "OK"). By using "Aliases.browser.BrowserWindow3.SetFocus()" the window got focus, but when try to SetFocus on any object on that page, the error message say "Unable to find the object SetFocus. ". But really it was able to find and clicked, no issue. I don't know why there is error message there. If SetFocus is not use, object cannot be found.
Please describe what you are trying to implement and any information such as application type (WEB vs Desktop),
technologies used in the app, screenshots of the objects in question using Object Spy and/or object browser
- WEB application using IE.
Thanks again
Related Content
Recent Discussions
Check PopupMenu exists
Solved3 days agomfoster711- 4 days agosimonaferrara
- 4 days agomacheshmeh