This is a migrated thread and some comments may be shown as answers.

AutomationID

10 Answers 184 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mostafa
Top achievements
Rank 2
Mostafa asked on 07 Feb 2013, 08:56 AM
Hi Telerik Team,

I have implemented an automated test ready, that AutomationID used to find UI elements. The test was always successful. I have the new version of Telerik test studio instaled.And now, these UI elements based on the AutomationIDs can no longer be found ( see figure). The neu Version is the Latest internal builds (2012.2.1317i). What is the Solution? can u help me please.

Thanks & Greetings
Mostafa

10 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 07 Feb 2013, 12:00 PM
Hello Mostafa,

I am sorry to hear you are running into this problem.

However the screen shot doesn't indicate that the element is not found. This is a screen shot of our verification builder.

In order to help you best please elaborate a bit more on your scenario.

1. Send us the execution log.

2. A Jing video of the behavior may also help us diagnose your issue.

3. Please send us the test project and give us a direct access to the application if it is possible for further investigations.

Thank you for your cooperation.

Kind regards,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Mostafa
Top achievements
Rank 2
answered on 07 Feb 2013, 05:13 PM
Hi,
i will post the logfile. the error message is:

InnerException:ArtOfTest.Common.Exceptions.FindElementException: Element Not found!FindExpression used: [automationid 'Exact' KF_00:00:08:15] AND [xamltag 'Exact' KeyFrameItemControlWrapper] at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target) at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType) at ArtOfTest.WebAii.Silverlight.VisualWait.ForExistsInternal(Int32 timeout, Boolean invertCondition) at ArtOfTest.WebAii.Silverlight.VisualWait.ForVisible(Int32 timeout) at ArtOfTest.WebAii.Silverlight.VisualFind.ReturnOrThrow(FrameworkElement e, String throwMessage) at ArtOfTest.WebAii.Silverlight.VisualFind.ByAutomationId(String id, String xamlTag) at ArtOfTest.WebAii.Silverlight.VisualFind.ByAutomationId[T](String id) at MediaCenter.KeyFrameGeneratorMPEG1AutomatisierteTests.QA001_KeyFrameGeneratorNDRWithVideoFormatID21.FindListboxItemByAutomationID(String automationIDToFind) in D:\SVN\DMM\DEV\DOTNET\S4M.DMM\QA\VPMS_Releases\VPMS6.5\MediaCenter_Testfaelle\KeyFrameGeneratorMPEG1AutomatisierteTests\QA001_KeyFrameGeneratorNDRWithVideoFormatID21.tstest.cs:line 203 at MediaCenter.KeyFrameGeneratorMPEG1AutomatisierteTests.QA001_KeyFrameGeneratorNDRWithVideoFormatID21.QA001_KeyFrameGeneratorNDRWithVideoFormatID21_CodedStep2() in D:\SVN\DMM\DEV\DOTNET\S4M.DMM\QA\VPMS_Releases\VPMS6.5\MediaCenter_Testfaelle\KeyFrameGeneratorMPEG1AutomatisierteTests\QA001_KeyFrameGeneratorNDRWithVideoFormatID21.tstest.cs:line 113

Thus, the element can not be found. But I was able always to find this element with the AutomationID. And now no longer.

I use thise Funktion
ByAutomationId<KeyFrameItemControlWrapper>(automationIDToFind);

i think Telerik test studio have a bug

what should I do
0
Alan
Top achievements
Rank 2
answered on 07 Feb 2013, 05:14 PM
In your screenshot, it looks like you are identifying the object using "Name", "AutomationID", and "Uid".  Is it possible that the "Uid" is dynamically generated?  If so, finding an element using an old Uid will not work if a new one is generated at runtime every time.
0
Mostafa
Top achievements
Rank 2
answered on 08 Feb 2013, 08:58 AM
Hi,

the right AutomationID is not displayed, and the Schrennshot only serves as proof. So you see that the field AutomationID has not  the correct value. currently, all tests that use AutomationID have failed!!!!
0
Adriane
Top achievements
Rank 1
answered on 08 Feb 2013, 11:55 AM
We are using static AutomationIDs that are always the same we open the website.
This is only because Telerik is not able to find some elements. So this worked for us fine.

We debugged in the code and could see, that our automationIDs are the same as before.

We use this in Visual Studio like Mostafa described above, but we also use it in Standalone Version, this will take the following steps:
If we make up a verification step, we could step in the DOM, search for the AutomationID and take that element.
Telerik is using the AutomationID to identify that element.
Now the Elements cannot be found if we replay the test.

We need a solution very soon! Without the possibility to use automationIDs we cannot use Telerik anymore.

Best regards
Adriane
0
Boyan Boev
Telerik team
answered on 11 Feb 2013, 09:37 AM
Hello Adriane,

I noticed in the screen shot of the DOM that the element you are looking for has no AutomationID attribute.

In order to help you best we need to reproduce this behaviour on our end. Please send us the test project and give us a direct access to your application.

A Jing video of the behavior may also help us diagnose your issue.

In the meantime you can try to change your find logic to use another attributes to locate the element.

Thanks for helping us advise you.

Greetings,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Adriane
Top achievements
Rank 1
answered on 11 Feb 2013, 09:50 AM
Hi,

with an older version we see here an AutomationID, that is the funny thing here, so its no change in code on our side.
We have no external access to the system, so we cannot provide this.

We cannot use another attribute, because we need the AutomationID in here like it is before.

Please take a look in your code what has changed and provide the automationID again, we cannot use Name or something.

Best regards,
Adriane
0
Boyan Boev
Telerik team
answered on 11 Feb 2013, 03:15 PM
Hello Adriane,

I can confirm that we have not made any changes with how we locate the elements during recording. Please send us a screen shot or record a Jing video that demonstrates you are able to see AutomationID with an older version of Test Studio. A screen shot showing our DOM tree with your AutomationID's visible would be very helpful in diagnosing this problem.

In general the AutomationID either exists or not. It does not depend on the version of Test Studio.

You can record also a Fiddler trace using FiddlerCap and send it to us in a zip file. We can try to "simulate" your app in order to reproduce the problem locally.

Hope to hear from you soon.

Kind regards,

Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Adriane
Top achievements
Rank 1
answered on 12 Feb 2013, 03:41 PM
Hi Boyan,

I'm very sorry about all that.
We found some small thing, which has deep impact for the automationIds behaviour, so we see it in the debugger, but not in the release version.

Do you know a free tool to get access to a silverlight AutomationId?
(Just to verify something like that, if we have another problem here, were we do not know exactly where the problem is)

We know Silverlight Spy, but it also do not show AutomationIds.

Again, pardon us.
Adriane
0
Boyan Boev
Telerik team
answered on 13 Feb 2013, 04:55 PM
Hi Adriane,

If the elements in your application have AutomationIDs Silverlight Spy should be able to see them as well as Test Studio.

I used both tools against our Silverlight demo site and both were able to show the AutomationIDs (see the attached screen shots). 

Please consult with your development team if something has been changed in your application.
 

Regards,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Mostafa
Top achievements
Rank 2
Answers by
Boyan Boev
Telerik team
Mostafa
Top achievements
Rank 2
Alan
Top achievements
Rank 2
Adriane
Top achievements
Rank 1
Share this question
or