Ask a Question

Objects not found after new pages slide out on web site that uses Slick Carousel


Objects not found after new pages slide out on web site that uses Slick Carousel

I am writing an automation test against a site that uses Slick Carousel ( ).  There are 3 or 4 pages in this carousel.  When the action button is pressed, the pages will advance 1 page at a time.  However, the main page in the browser does not change.  The carousel is a smaller box that fits within the main page. 


When creating a Property check point in Test Complete, if I manually navigate to page 2 in the carousel, I can record a Property check point.  The object is mapped to Name Mapping correctly.  Everything looks good here.

However, when I play back my script to run the automated test, after the script executes the command to press the button on page 1 and advance to page 2 in the carousel, Test Complete can not find any objects on page 2 in the carousel.  Test Complete finds every object on page 1 of the carousel though before the button was pressed.  Obviously, Test Complete can even press the button on page 1 to get to page 2.


So, the problem occurs when the action button on page 1 is pressed and the Slick Carousel slides page 2 into view.  No change occurs for the whole page in the browser.  The changes just occur in the carousel itself.  I am wondering if Test Complete does not know that page 2 is now displayed?  Maybe this is because no refresh of the page occurs?


So, I thought that I could refresh the page on page 2.  That is not a possible solution in this scenario though.  A refresh for this site on page 2 takes us back to page 1 every time.


So, I have quite a dilemma here.  Anyone have any ideas how I can get Test Complete to see the items in the carousel on page 2 ( actually happens on pages 3 and 4 also )?




I'm still pretty new to TC but usually when I have a problem like that, then it is likely that I have a property that is dynamic.  Did you use object spy to check if maybe the ID of the objects in the carousel are changing?  If that is the case then you could probably fix it with wildcard(*).


Another thing to consider is that maybe you need to put a delay after the button is pressed.  It may also be the case that TC was too fast.  As in, TC started looking for the object before the object was loaded thus was unable to find it.


Doing a refresh of the mapping info, on page 2 of the carousel, seemed to fix this.  I also added a delay to make sure the refresh was done:


     Call NameMapping.Sys.browser.RefreshMappingInfo()
    'Wait for refresh to occur
     aqUtils.Delay 2000


Now, Test Complete can see the items on page 2 of the carousel.  I expect the same to work for pages 3 and 4 as well.

Ya, I had actually looked at the F12 Developer console also to see what the id was when I put a break point on this problem spot.  Everything was checking out correctly.  I also put a long pause or even let the break point sit there for plenty of time ( a minute or more ) and that did not help.  Those are very good ideas though.  Thanks!  I posted the solution that worked for me ( although I am sure there are other solutions that could work also. )

Showing results for 
Search instead for 
Did you mean: