How To Click Unopened Tabs Where The Numbers Change
Solution 1:
Rather than using an index to reference these "tabs", you need an alternate way to uniquely identify each one.
One solution is to work with the developers of the site to get them to add an id or name attribute to the "KambiBC-collapsible-container" for each tab.
Another solution, if you're using the Page Object Model approach, would be to create a method on the page that provides a list of the available tabs that you can then reference by the header text. Then you just keep track of which ones you've opened.
Yet another solution would depend on the functionality of the site. You may be able to leverage the fact that if a tab has been opened it looks like the container has a class "KambiBC-expanded". If a tab will stay open until you explicitly close it, you could simply get a list of all of the containers that do not have the "KambiBC-expanded" class and pick one to expand, repeating until there are no more to expand.
Post a Comment for "How To Click Unopened Tabs Where The Numbers Change"