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 :

Please let me know, if you have any idea about this.

Senior Quality Engineer, FTD Systems. USA

balukondamuri Default Asked on December 31, 2014 in Selenium WebDriver.
Add Comment
3 Answers

Hi Balu,

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
– GetProductsByCharacter
– ClickOnProductCheckBox

If you need help in that try reading this

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.


Professor Answered on December 31, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.