Quality Testing

Quality is delighting customers

How to open sub menu by using mouse hover in Selenium WebDriver?

Learning Basic Level selenium - webdriver

How to open sub menu by using mouse hover.

Views: 77

Reply to This

Replies to This Discussion

The general flow would be something like:

WebElement menuHoverLink = driver.findElement(By.linkText("menu link text"));
  • Use Actions class to hover the menu
Actions actions = new Actions(driver);

actions.moveToElement(menuHoverLink).perform();

WebDriverWait wait = new WebDriverWait(driver,10);wait.until(ExpectedConditions.presenceOfElementLocated(By.linkText("sub menu text")));
  • Now you should be able to click the submenu item
driver.findElement(By.linkText("sub menu text")).click();

Thanks for sharing your knowledge....

How to select the previous month / next month date by using selenium web driver.... i uploaded calender image, which is i am used...please share your script...

Attachments:

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2019   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service