Forum Discussion

suwingben's avatar
suwingben
Contributor
13 years ago

Some Questions

I've got two questions regarding two separate issues, but rather than make two threads, I've gone this route. If that's not okay, I'll make a separate thread for a second.



The first question is can I take my IE keyword tests(they were captured with IE) and use them on firefox somehow?



The second, you'd have to see screenshots.



If you look at the calendar.png, the digits on the calendar can all be links. Every week or so, I have to go through and update all of my tests for them to have the ability to select a valid date. Is there any way to have the portion that says link13 in the keywordtest.png be more dynamic and less brittle? I'd like to be able to work it off of some sort of variable so that I can cut down on modifications and make it a lot more autonomous.


5 Replies

  • Hi,



    The first question is can I take my IE keyword tests(they were captured with IE) and use them on firefox somehow?


    You can do this, but you need to modify your tests. The idea is to exclude anything browser-specific (like the process name or windows present in one browser and not in the other one) from it and work only with the page itself and its objects which are the same in all browsers and depend on the page's DOM structure.

    See the Cross-Browser Scripting help topic for more information.



    Is there any way to have the portion that says link13 in the keywordtest.png be more dynamic and less brittle?


    You need to edit Name Mapping rather than your test. What you need to do is map each link by unique properties assigned to it. Currently, they seem to be mapped by index. Try mapping them by captions - in this case, you should be able to make buttons always have names bound to numbers they display, and make these names static, no matter how buttons are placed.
  • Thanks so much for your help Jared!



    Now the second portion that is based on the name mapping, would I be able to make the date selection based on The current date +1?



    So like today being the 26th, I'd like for it to select the 27th automatically instead. Is there a way to assign this click a variable to be able to just sit the test down and have it run? So far it's pretty autonomous, but this would be the last point to make it truly automated.
  • Hey Jared,



    Maybe we're not communicating correctly.



    Here's a copy of my keyword test. I need to be able to declare a variable so that I can map it to the object that is labeled second friday. Using your instructions, I'm told by testcomplete that using this variable will not give me unique enough criteria to work and the identity gets lost.





    I'm not sure if this makes any more sense but essentially, i want to put in a number and have it know which friday to click when the time comes. (1,2,3,4,) but I can't seem to find a way to do it.
  • Hi,



    If I get it right that you need to click your object only on specific dates, you don't need to use Name Mapping in any special way. Map your object by properties which will allows recognizing it reliably (ragardless of the date) and check the current date in your test. If it is the needed date, click your object, otherwise, skip this step.