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 ( http://kenwheeler.github.io/slick/ ). 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 )?
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 2000Now, 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.