Ask a Question

Mapping problems and such

SOLVED
Blur
Contributor

Mapping problems and such

Hello,

 

I am currently working with multiple calendars.  TestComplete's auto mapping works fine for the most part.  However, when I got to the second calendar the issues appeared.  It would click the wrong dates or not the dates at all.  I decided to manually map the calendars only to find out that they were both trying to be mapped as the same object.  The odd thing is when I try to map it, it says it is already mapped and shows the previous calenedar.  But when I try to highlight object on screen, it won't find it.  Basically, it thinks it is mapped but it is not.  I was able to fix this problem before by remapping the whole thing but this time around I've made too much progress.  Is there a way to fix this without re-mapping?

17 REPLIES 17

Can you provide an example?  I'm still relatively new to TestComplete.  As in I have only been using KeywordTests.  Thanks

Ah. Right.

 

Sorry, I assumed you were using script. My bad.

 

Ummm .... depends on the language you're scripting in. With keyword tests, I'm afraid I have no idea. I've never used them. I came from scripting with QTPro so have used scripting from day 1 with TestComplete as well.

 

If you want to try and script it, I can probably give you some basic pseudocode, but without actually inspecting the calendar object, it's hard to give you anything thats likely to work straight out of the box ...

Yea, I was assuming you thought I was scripting.  I think I could incorporate scripting into KeywordTests.  Some pseudocode would be great.  I attached some screenshots of the calendar object with object spy.

I suspect there may be object(s) below that?

 

I think you just have the container panel there. It only has one child object? I would expect it to contain a table of some sort?

 

I looked up boostrap datepickers (not used that particular one myself) and found this:

 

http://vitalets.github.io/bootstrap-datepicker/

 

On inspecting the examples on there, they do indeed contain a table, cells, etc etc. Does yours contain similar if you drill down a little further? This is all quite hard to do without actually seeing the control in question ....

If I map them all then there will be more child objects.  The datepicker looks exactly like the one I'm using.  I'll check up on the calendar and post an updated object spy if I can.

 

Edit: For some reason the object spy just gave the panel it was in.  Attached is the table.

Anything new?  I'll probably re-map if nothing else works.

Sorry dude. Snowed under at work the last few days and trying to get things tidied up before holidays. Not had a chance to do anything with this.

 

In short though ....

 

My function would take in:

 

The calendar as an object, or a reference to it.

A date (in parts if you want to make life easier).

 

Then it's just a matter of starting from the highest level (year), and working your way down. Select a year, then month, then day. Didn't look properly at the structure. Some of it may involve iterating through a collection (if it uses lefgt right button or something for month?) where day may just be using FindChild on a table.

 

Give all your searches & loops meaningful exit caluses so you can log appropriately if someone tries to select something like the 31st February.

 

All depends how the internals are built up really.

I'll probably re-map it for now and if the higher ups want something more efficient than I'll look into your method.  I might convince them to switch over to scripting.  Thanks.

cancel
Showing results for 
Search instead for 
Did you mean: