Hi Team,
I have modified the patch and used CSS Selector in add_server() function.
I have also tried different approaches to eliminate XPATH in click_tab() function but failed to do so due to following reasons-:
1. :contains() function doesnt work with CSS selector in selenium and since in most of the anchor tags there is no specific attribute present by which we can make the locator generic so that it can work for any tab.
2. Tried using link_text or partial_link_text locators but since click_tab() is a generic function which can click on any of the provided tab name and in our case we do not have every tab having href attribute, we have span tag as the tab as well (ex. Query tool tab) so link_text is not the right option for it since it work only with the href attribute or anchor tag.
I found that in such cases XPATH is the only option to continue with.
If anybody is having some another idea to achieve this using CSS Selector than please suggest.
Thanks and Regards,
Shubham Agarwal