Forum Discussion
12 Replies
- NikhilReddyOccasional ContributorHi,
I too have the same problem.
Sometimes TestComplete-9 will suddenly stop recognizing the objects
within silverlight application. I am using IE 9 (64-bit) to run
application, I have seen the same issue before with IE(32-bit) and also when
using TestComplete 8.7. I coudn't resolve the issue that time so stooped
using TC 8.7.
Now with TC 9 I have the same issue,
To resolve this problem
I will save all files, close TC, clear cache in IE 9 and reopen the project and start recording/running tests. There is no guarantee that this will always work. It worked only a few times.
I want to know if there any particular reason why TC fails with silverlight and any other particular solution to make it work after it stop recognizing objects.
- Julia_KSmartBear Alumni (Retired)
Hello gentlemen,
To help us investigate the problem, could you please give us the following information?
1. Does TestComplete throw any errors when it fails to recognize Silverlight objects, for example, "Silverlight application was not properly prepared for testing error"?
2. How do you prepare your Silverlight application for testing? Do you use the tcAgPatcher utility to prepare the application?
3. What web browser do you use? Does the issue persist with other browsers?
4. Do you always clear the browser cache before you start the testing as it is recommended in the [url=http://support.smartbear.com/viewarticle/31671/]Preparing a Web Browser for Testing Silverlight Applications
[/url] Help topic? Do you follow other recommendations listed in the [url=http://support.smartbear.com/viewarticle/31671/]Preparing a Web Browser for Testing Silverlight Applications
[/url] and [url=http://support.smartbear.com/viewarticle/29603/]Preparing In-Browser Silverlight Applications for Testing
[/url] Help topics?
5. How do you launch your tested Silverlight application? Do you launch it before or after you launch TestComplete?
6. Does the issue persist only with your application or with any Silverlight application?Thanks in advance.
- DhanaContributorHi, I too face the same problem and I too posted my problem but still I didn't get correct solution for my query :( and the worst part is now I am unable to find my post.. I have only the mail content which i have posted below.
From the below post please ignore the LLP part and the IE issue ( bolded and underlined text), in no cause it is linked with this issue.
Please let me know the right way to solve this issue ASAP.Posted by Dhanalakshmi Aiyappan on 6/14/2012 1:55:26 AM
Hi,
I have automated the Silverlight application using IE and while playbacking the scripts, at times am facing an problem like " Object can't find" but the LLP runs as per recorded with very slow moment which takes more time to complete the project than expected. Please refer to the attached Test Log details of the problem I am facing.
As long I investigated, I came to know if the IE already exists before my application launch, this problem comes but even to solve this kind of problem, all my scripts has " KillExeProcess" to run before start of the application which helps to close any IE opened, if any. But still I come across those kind of problems. And also, when i run the application from the TestedApps, the application runs fine and if i run that particular scripts individually, the script runs fine. But why do I face those problem???? Please help me to solve this..
If you are in need of any other details regarding this, am pleased to provide you the required details.
Thanks in advance :) - Julia_KSmartBear Alumni (Retired)
Hello Dhana,
Do you mean this forum thread - http://community.smartbear.com/forum/post.aspx?mode=singleThread&thread=949f6c7d-3e4f-43db-90a0-36e4d3f66d3d?
Still, could you please give a bit more details on the Silverlight issue you have?
What are the symptoms of the problem? Does TestComplete fail to recognize internal objects in your tested Silverlight application during the test run?
Could you please follow the instructions given in my previous post to provide us with more information on your Silverlight application?
We would also appreciate it if you posted here your script code and the exact text of an error that is posted to the test log (along with the text posted to the Additional Information panel of the log).
Thanks in advance.By the way, while forums are a great way to interact with other TestComplete users, they do not really suit the urgent troubleshooting of technical issues. If you need to solve the problem as soon as possible, I recommend that you contact our Support Team directly by submitting a ticket via this web form.
Good luck. - DhanaContributorHi Julia,
Please find the below details,
1) TC doesn't throws any error, infact the recorded LLP goes well
2) My Silverlight application is been added in TestedApps by adding the html link, and from TestedApps, I run the application for recording and the same is done through scripts while running. And I am not aware of the tcAgPatcher utility, so my scripts doesn't use it.
3) Mine is IE 8 and no idea with other web browser
4) Yes all my browser cache is been cleared before I start the testing as it is recommended in the Preparing a Web Browser for Testing Silverlight Applications
5) I launch my Silverlight application through TestedApps and obviously the application launches after TC
6) No idea, as am testing only with my application
I have attached the code and the Test Log report, please refer to that.
Thanks - Julia_KSmartBear Alumni (Retired)
Hello Dhana,
Thank you for the code and the test log.
As far as I can see, you get the "Cannot obtain the window with the window class 'MicrosoftSilverlight', window caption '*' and index -1" error. Have you tried following the instructions described in the Handling 'Cannot Obtain the Window...' Error Help topic? Does this help? Does the needed Silverlight object really exist in your application during the test run, and is its name specified in the test correctly?
Thank you. - DhanaContributorHi Julia,
I am pleased to be informed you that all the basic things has been verified, i.e. window name, class name and the index. I have already posted in my first post in http://community.smartbear.com/forum/post.aspx?mode=singleThread&thread=949f6c7d-3e4f-43db-90a0-36e4d3f66d3d , that when i run either the application or the scripts individually, it runs fine.
Also I would like to say, if i have some 5 scripts automated for different scenario of the same application, in that 4 scripts runs fine and one shows me the mentioned problem. I am not clear that for all the 5 scripts the application name, i,e, window name, class name and index has been mentioned the same but why does in 5 scripts 1 get failed??? And also this goes with random scripts, i.e, in my today's automation report if scripts 1 failed with the mentioned error and in the next day the script 1 get success but the scripts 2 get failed.
Please if you get any idea why this is happening then share with me or please let me know the alternate way of automating the Silverlight application to aviod these kind of error.
Thanks :) - Julia_KSmartBear Alumni (Retired)
Hello Dhana,
Such an error can occur if the required object does not exist at the moment when your test obtains it.
Have you tried solving the issue by waiting until the object is created as it described in the Waiting for an Object, Process or Window Activation Help topic?
Is your Silverlight application launched in windowless mode?If you are interested in alternative ways of testing Silverlight applications (instead of using low-level procedures), please refer to the Testing Silverlight Applications section of TestComplete’s Help system. It describes how to test a Silverlight application by accessing the application’s internals and simulating user actions against the application’s controls.
Thank you.
- DhanaContributorHi Julia,
The object exsists while running the scripts. My Silverlight application is been launched while playbacking the scripts but the LLP goes with slow movement where I am confused why this is happening. Please ask me some other question rather than the basic things because all the basics needed things has been checked by myself.
Also i have a small doubt in following the steps in which you suggested, Testing Silverlight Applications.
In the above article while going forward, http://support.smartbear.com/viewarticle/27751/, i have a doubt in the fiveth point in Adding the Application topic, which explains about the application ID, it will be better if you can tell me in details how to get the application ID for my Silverlight application.
Thanks. - Julia_KSmartBear Alumni (Retired)
Hello Dhana,
Unfortunately, it is difficult to provide you with some other but basic help without actually seeing your application under test or knowing your environment specifics.
That is why, I still recommend that you contact our Support Team directly by submitting a ticket via this web form, send them your application under test and your test project so that they could investigate the problem properly and provide you with some decent solution.i have a doubt in the fiveth point in Adding the Application topic, which explains about the application ID
The "Preparing Test Projects for Testing Out-of-Browser Silverlight Application" Help topic contains the instruction on how to get your Silverlight application ID. Have you tried following that instruction? What step of the instruction caused difficulties?
By the way, is your Silverlight application out-of-browser? Is it executed in a web browser?Thank you.
Related Content
Recent Discussions
- 5 minutes agoSvetaG