JS Testing Academy · QA Demo Site

Menu

A menu bar with sub-menus that open on hover, including a third level. Classic Actions chaining practice.

Practice tasks

  1. Hover over Training and assert the sub-menu becomes visible.
  2. Hover over Automation and assert the third-level menu opens.
  3. Click Playwright in the third level and assert the output shows your selection.
  4. Move the mouse away and assert both sub-menus close.
  5. Assert that the sub-menu items are not clickable before hovering.
Sample automation code
Actions actions = new Actions(driver);
actions.moveToElement(driver.findElement(By.id("menu-training")))
       .moveToElement(driver.findElement(By.id("menu-automation")))
       .moveToElement(driver.findElement(By.id("menu-playwright")))
       .click()
       .perform();
Assert.assertTrue(driver.findElement(By.id("menu-output")).getText().contains("Playwright"));