I use selenium, WebDriver, Intellij, Junit4, ChromeDriver, PageObject.
Testing this site: http://store.demoqa.com/products-page/product-category/ .
If I click manually on the link "Product Category", you can see that, the page will reload, the dropdown menu will disappear for a short moment. Actually you just need to hover over the link "Product Category" and click on "Accessories" using action.moveToElement(), but I don't know how to write code. Can you write me code.
This is my code:
public ProductPage clickOnAccessories(){
//Click on link “Product Category” than “Accessories” on website navigation
driver.findElement(By.id("menu-item-33")).click();
driver.findElement(By.id("men34u-item-34")).click();
}