In my application, I have an overview panel with 6 gauge type sections in it. Each of those sections has a title, gauge, a ‘good’ button, a ‘better’ button, and a ‘best’ button. When you click the title it takes you further down the page to the corresponding panel. In that panel, it will list the Top 5 records (no criteria). However, if I select the ‘good’, ‘better’, or ‘best’ button, it takes you to the same panel but lists the records that meet the criteria selected. At the top of that panel there are 5 buttons: Top 5, Good, Better, Best, All. When clicking the buttons in the overview panel mentioned above, whichever you selected will have the corresponding button selected below. The buttons all have the class “btn-disabled” until one of them is selected via the overview panel, or in the lower panel. When the button is selected, it dynamically adds the class “btn-primary”
My issue is that when using ‘Spy Web’ to capture these buttons as test objects, it captures them all with the class “btn-disabled”.
I am trying to validate that when I click the ‘good’ button in the overview panel, that the corresponding ‘good’ button below has removed the class “btn-disabled” and added the class “btn-primary”.
What I am seeing when defining a variable classList = findTestObject(“good-button”).findProperty(“class”), is that even though I have clicked the ‘good’ button (and verified in Chrome inspector that the classes have updated), that classList = the list from the test object. That makes sense due to findTestObject.
What I am looking for is a way to get the classList from the element on the page during runtime rather than the test object in the repository, or even a way to update the test object properties during runtime.
Anyone have a good way of doing this?