JS Testing Academy · QA Demo Site

Resizable

Drag the corner handle to resize the box. One box can be any size, the other has minimum and maximum limits.

Free size

Drag the bottom-right corner

With limits (min 200×120, max 500×320)

This box cannot go below 200×120 or above 500×320

Practice tasks

  1. Read the starting width and height of the first box.
  2. Drag the handle 120 px right and 80 px down, then assert the new size.
  3. Shrink the limited box as far as you can and assert it stops at 200×120.
  4. Enlarge it as far as you can and assert it stops at 500×320.
  5. Assert the size output updates during the drag.
Sample automation code
WebElement handle = driver.findElement(By.id("handle-free"));
new Actions(driver).dragAndDropBy(handle, 120, 80).perform();

WebElement box = driver.findElement(By.id("resizable-free"));
Assert.assertTrue(box.getSize().getWidth() > 380);