RE: How to find xpath for Brand dropdown values for below site
Seems it’s difficult to get xpath for Brand dropdown values as it is mouseover dropdown. Once we move away mouse from that section that dropdown will be gone.
Link copied here :https://www.nordstromrack.com/shop/Men/Watches
Please let me know, if you have any idea about this.
Senior Quality Engineer, FTD Systems. USA
Just saw the page source and we cannot handle this using a Select class. The reason, as you mentioned, it doesnot have the select tag. And to be honest the Drop down element in your case is very complex.
I would suggest that you write a page object for this drop down. This page object would include services like
If you need help in that try reading this http://www.toolsqa.com/selenium-webdriver/page-object-pattern-model-page-factory/.
I am saying create a factory because
1. The element is complex element with lots of sub elements
2. You would be needing this element a lot and its better to make a class out of it
3. That way you will encapsulate the complexity of finding the Brand and its inner element and the users will just use your class.
if you cant get this to work, let me know. I will try some demo code for this, which you can later expand.