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
Marsha_R
Community Hero

There are a couple of things I would try. 

 

First, create another project in TC just to use as a sandbox.  Then, manually name map some of the second calendar and see if you can spot what it has in common with the first calendar.  If that's obvious, then maybe you can update your existing mapping to use some wildcards that will help it fit both calendars.

 

If that doesn't seem feasible, then you can fully map the second calendar in the sandbox, export the name mapping, then merge it with your existing mapping.  If there are too many conflicts, then remapping might be still be what you need to do, but maybe just part of the tree.  You don't always have to delete the whole branch.


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

Your first suggestion is actually what I did prior to seeking help.  The calendars are actually mapped in different areas when I create another project.  Like if you look at screenshot for example, one would be in pageAutomationInstinctbetaGongos and the other would be in pageAutomationInstinctbetaGongos1.

 

I haven't tried to use wildcards to fix this yet.  I'll give that a try and if that doesn't work I'll try your second suggestion.

 I don't really mind remapping the whole tree but is there a way to update all the chances in the testcase more efficiently or do I have to run each test case and update when they come up as an error/change.

Marsha_R
Community Hero

I don't believe there's a way to do a mass update in name mapping.  If I recall, there might even be a post in Feature Requests for that.

 

Run it and catch them one at a time is what I would be doing too.


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

Thanks for the help.  I'll probably just end up remapping.  Also, if I have questions regarding TestExecute, should I ask here or go to the functional web testing?

Marsha_R
Community Hero

Sure.  I wish there were better answers!

 

TestExecute works with any test, so I think posting here would be fine.


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

Straying slightly off tangent .....

 

Are these calendars all the same? ie. They're all the same type of calendar object? They're just invoked at different points in the application and there will only ever be one live one on screen?

 

(I have similar type calendars. Also colour pickers, and icon pickers.)

 

In which case, I would not be mapping it/them at all. A shared helper function that you pass a calendar object into would make more sense no? One function then handles all your calendars, no mapping required. You may also want to set up an additional function to find the active/visible calendar at runtime. May or may not be handy. Hard to say without knowing how your application works.

If you take a look at screenshot2 that's the closest they'll come to at running more than 1 live at a time.  I have to click on the textbox for the calendar to appear.  You're right though.  It's actually better not to map them.  That's basically the only reason one fo my pages runs perfectly.  The problem is that on another page with a calendar, it will click a textbox and the calendar appears which is great.  But then TestComplete can't click on the dates correctly.  It'll be either clicking the days of the week, which are not even buttons or clicking the arrows on the top to change months..

 

I'll try to set up a function to find the active/visible calendar at runtime.  Could be useful.

That should be fine. There are two available on screenshot 2, but only ever 1 live one.

 

I would go with finding the calendar object, and then passing the object into a shared function (along with some parameters for what date to select and whatnot) and then just use that function on all calendars.

 

It's definitely the way to go if it's a common component.

cancel
Showing results for 
Search instead for 
Did you mean: