Forum Discussion

dasabaja's avatar
dasabaja
Occasional Contributor
9 years ago

DevXpress dateedit calendar

Hi people.

I'm quite new to TestComplete, I'm still going through TestComplete's on-demand video trainings and I've hit my first snag. One of many more to come, probably.

 

I'm having problems testing this: 

 

It's a date property on our document management desktop application. It's written in .NET, using DevXpress. This in particular is DateEdit. On top of that, it's and DateEdit repository item from DevExpress. From a user standpoint it's a simple drop down where a little calendar appears and I can pick a date.

 

TestComplete is having problems when I run my test. It doesn't detect this pop-up calendar. It only detects a click on certain coordinates, but no calendar.

 

This is my test:

 

 

and my log:

 

 

I went around and tried to add that particular item to the Object mapping list. I grabbed the calendar itself. TestComplete's Object spy recognized it as VistaDateEditCalendar, but it still doesn't detect that it's actually a calendar.

 

If I grab the combo-box itself, I get WindowsForms10.Window.b.app.0.141b42a_r39_ad1. But event then - no calendar recognition...

This exact same calendar appears on several more places in our apps and I could really use any input you might have. 

Thanks.

  • The two things I would suggest you look into first ....

     

    1. Are the controls being recognised correctly if object if you object spy them? ie. They has all the relevant property data, fields and methods present? It looks like the actual calendar is working OK. (It clicks the cell based on value) The error is on the DateEdit field? I'm guessing the calendar populates the value you select into that field? I'd suspect it's that that's the problem here ...

     

    2. The "hint" before your error line suggests you have object recognition problems (with the edit field, not the calendar itself). As your date edit field is not being populated, it could be that whatever properties you used to map it are not staying consistent at run rime.

     

    Finally, as this is a date field, I reckon you'll have more work ahead here. Have you already parameterised it? As obviously, dates in December won't work in January. Record and playback, without converting at least parts of it to parameters, seldom works for calendars.

    • dasabaja's avatar
      dasabaja
      Occasional Contributor

      Hi, Colin. Tnx for the reply.


      Colin_McCrae wrote:

      The two things I would suggest you look into first ....

       

      1. Are the controls being recognised correctly if object if you object spy them? ie. They has all the relevant property data, fields and methods present? It looks like the actual calendar is working OK. (It clicks the cell based on value) The error is on the DateEdit field? I'm guessing the calendar populates the value you select into that field? I'd suspect it's that that's the problem here ...

       

      I believe TC recognizes everything in order. Once you manually click the drop down menu and pick a date, that date will populate the field you originally clicked. Like this:

       

      My problem is that TC cannot reproduce that field population. It doesn't get that there is a calendar there once you click the little arrow on the right.

       

      2. The "hint" before your error line suggests you have object recognition problems (with the edit field, not the calendar itself). As your date edit field is not being populated, it could be that whatever properties you used to map it are not staying consistent at run rime.

       

      I forgot to include the hint text:

      Failed to find the exact match for the test object:

      NameMapping.Sys.Client.PropertiesForm.layoutControlProperties.tabControlP.tabPageDocAttr.layoutControlDocAttr.gridControlAttr.DateEdit


      Hint: A similar object has been found – see the Picture tab. Consider updating the identification properties to use the similar object:

        Property Mapping Value Found Action

      ClrFullClassNameDevExpress.XtraEditors.DateEditDevExpress.XtraEditors.DateEdit 
      WndCaption2018-05-18 Update


      View identification properties in the Name Mapping editor

       

      I'm not sure what this August 18th is, though...

       

      Finally, as this is a date field, I reckon you'll have more work ahead here. Have you already parameterised it? As obviously, dates in December won't work in January. Record and playback, without converting at least parts of it to parameters, seldom works for calendars.

       

      Parametrisation hasn't been mentioned in the training video so far. I'm not sure what you mean by this so I'm afraid I don't know what to answer to this question...


       

      • Colin_McCrae's avatar
        Colin_McCrae
        Community Hero

        There is your problem ...

         

        Hint: A similar object has been found – see the Picture tab. Consider updating the identification properties to use the similar object:

          Property Mapping Value Found Action

        ClrFullClassNameDevExpress.XtraEditors.DateEditDevExpress.XtraEditors.DateEdit 
        WndCaption2018-05-18 Update

         

        It is the Date Edit field.

         

        That second line is why it isn't finding it. I'm guessing you just kept whatever properties it used to capture the object when you recorded this? Well, one of the properties it used looks like a date. Albeit a date in 2018. You probably want to get rid of that as an identification property. The classname on it's own should be sufficient. Presuming you only ever have one on the screen at any given time.

         

        This is something you'll discover. The properties it uses automatically are not always reliable going forward!