Forum Discussion

sindhuja's avatar
sindhuja
Occasional Contributor
11 months ago

Issue with TestComplete Data-Driven loop

Hello Community,

 

I have a question, does TestComplete supports Data Driven loop for 40 countries site URL's  and for different languages(English and Non-speaking English languages).

Using Data Driven loop to run multiple testcases and data is getting from excel file.

Issue is with Data loop is not continuous, stopping me on errors mainly on "Property checkpoints", "Radio buttons", "check box" and "Objects".

 

URL Example _ for English speaking languages:

https://www.amazon.com/us/en (here URL says /us-United states country site and /en-English language)

https://www.amazon.com/my/en ( /my-Malaysia country site and /en-English language)

 

URL Example _ for Non-English speaking languages:

https://www.amazon.com/mx/es (here URL says /mx-Mexico country site and /es-spanish language, content text will be in spanish)

https://www.amazon.com/kr/ko ( /kr-united Korea country site and /ko-Korean language , content text will be in Korea)

 

Details:

-->Test Complete version 15.51

--> using keyword tests

--> using web applications for testing.

--> Dynamic URL parameters has been set and asterisk (*) added under URL processing properties.

--> For example, tested web application URL's like the following one:

     http://www.example.com/shop/login/systems/category=12111

     added * in the object name mapping editor and URL's in Name Mapping will be as follows: 

     http://www.example.com/shop/login/*/*

 

Issues:

--> once applying data loop to the scripts, first loop is working as expected and 2nd loop item is breaking on errors "Objects does not exit"

-->unable to continue with next Data-Driven loop item.

 

Expecting behavior:

--> Data loop should be continuous without any errors.

-->one single testcase should run continuous for 40 countries URL's listed in the loop.

 

Can someone please help me out!

 

Regards,

Sindhuja.

 

 

10 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Does the child object actually belong to the parent object? 

     

    What's the URL for the first loop and the second loop?

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Create a name mapping (parent object) that uses a wildcard like so,

    https://www.amazon.com/*

    Test your objects (child objects) to ensure the belong to the parent object.

    • sindhuja's avatar
      sindhuja
      Occasional Contributor

      click action is not same in the 1st loop and 2nd loop .UI part is different from country to country .i can see the below errors.

       

       

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        > Unable to find [...] Aliases.browser

        Is Aliases.browser the full name of the object that cannot be found? (I.e. did not you truncate the name for privacy reasons?)

        If the name is full, how 'browser' object is NameMapped in your project then?

         

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Click actions are different. UI part is different. May be data driven test is not your answer to resolving the issue.

     

    You have provided screen shots of the error, but it's difficult to provide any suggestion without knowing what the UI looks like, or snippets of code relating to the error.

     

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    The only thing I can suggest is to step through your code and correct your name mappings, may be include wildcards, for those controls that can not be found

    • sindhuja's avatar
      sindhuja
      Occasional Contributor

      1st loop country UI looks like below image.

      Please refer the marked ones in yellow , steps inside the script i need to click on and it should navigate to respective page.

       

      Second country loop looks like below image, UI is different and  Parent objects are not same

       

       

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    When I use the Object Spy tool, the object names are exactly the same. The only difference is the URL. 

     

    NameMapping.Sys.browser.Page("https://www.amazon.com/").Panel("a_page").Header("navbar_main").Panel("navbar").Panel("nav_main").Panel(1).Panel("nav_xshop_container").Panel("nav_xshop").Link(0)
    
    NameMapping.Sys.browser.Page("https://www.amazon.com.mx/").Panel("a_page").Header("navbar_main").Panel("navbar").Panel("nav_main").Panel(1).Panel("nav_xshop_container").Panel("nav_xshop").Link(0)

     

    You can use wildcard as mentioned in my response on the 29-05-2023, and you need to ensure your name mappings are correctly defined, and that you are using appropriate properties to identify each of the controls.