We are implementing automated QA testing (in Swift) and we're missing one key feature to optimize the process, and that is related to navigation.
Currently we need to do things like this (1 example out of many) looking for specific menu items.
- var cart_menu_item = "#Navigation_Page_Desktop_221_1867";
We can't rely on XPath because there may be in different locations. We can't rely on text, because there may be different languages and/or be translated.
My idea was to change the Swift Navigation templates to expose the NavigationTag as an attribute or (dummy) css class, and that way getting to the cart page would always be same selector for all of our projects. i.e.
- var cart_menu_item = "#Cart-page";
- var cart_menu_item = ".swift_cart-menu-item";
Currently the NavigationViewModel does not have a property exposing the NavigationTag, which to me seems to be the best solution. Can that be added? Or would it make sense to find another solution?