Home > Back-end >  How do I get Id, className, or CSS Selector from dropdownmenu that is div for selenium in java
How do I get Id, className, or CSS Selector from dropdownmenu that is div for selenium in java

Time:12-18

I tried every tag to get this element but it not working any help on this.

WebElement filterSizeDropdown = driver.findElement(By.cssSelector("#maincontent > div > div > div.klevuLanding.klevuTarget.kuLEFTFilters.kuSearchResultsPageContainer.kuCategoryPageContainer > div > div > div > div.kuResultsListing > div > div > div > div > section:nth-child(2) > div:nth-child(1) > div.kuDropdown.kuDropItemsPerpage > div.kuDropdownOptions > div:nth-child(2)"));
filterSizeDropdown.click();

Here is my code.

The problem is that the dropdown menu is not wrapped in select options. I dont know how to get this item element. Can anyone give me some hints?

enter image description here

  • Related