Design Grid Control Automated Tests with Java Part 2

Design Grid Control Automated Tests with Java Part 2

In my previous article, Design Grid Control Automated Tests Part 1, I started this mini-series about writing decent grid control automated tests. In this second part, I will talk about how to automate floating-point and date columns.

Design Grid Control’s Tests- Floating-point Column

Six filters need to be automated- EQUAL_TO, NOT_EQUAL_TO, GREATER_THAN, GREATER_THAN_OR_EQUAL_TO, LESS_THAN, and LESS_THAN_OR_EQUAL_TO. Also, an additional test should be added to verify that the clear filter functionality is working as expected.

For these tests, we will use a new utility method called g****etUniqueNumberValue. The value is based on the current time. Because of that, it is always unique.

private double getUniqueNumberValue() {
  var currentTime = LocalDateTime.now();
  var result = currentTime.getYear() +
    currentTime.getMonthValue() +
    currentTime.getHour() +
    currentTime.getMinute() +
    currentTime.getSecond() +
    currentTime.getNano();
  return result;
}

Freight EQUAL_TO Filter

@Test
public void freightEqualToFilter() throws Exception {
  driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/filter-row");
  var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
  var newItem = createNewItemInDb();
  newItem.setFreight(getUniqueNumberValue());
  updateItemInDb(newItem);
  kendoGrid.filter(FreightColumnName, FilterOperator.EQUAL_TO, Double.toString(newItem.getFreight()));
  waitForGridToLoadAtLeast(1, kendoGrid);
  List < Order > results = kendoGrid.getItems();
  Assert.assertTrue(results.stream().count() == 1);
  Assert.assertEquals(Double.toString(newItem.getFreight()), results.get(0).getFreight());
}

First, we create a new item in the DB. After that, we assign to the freight a new unique value. Then, we can filter directly on it, and we expect only one entity to be displayed. After the filtration, we wait for the grid to load a single item, get all the elements, and assert that only one item is present.

Freight NOT_EQUAL_TO Filter

@Test
public void freightNotEqualToFilter() throws Exception {
  driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/filter-row");
  var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
  var newItem = createNewItemInDb();
  newItem.setFreight(getUniqueNumberValue());
  updateItemInDb(newItem);
  // After we apply the orderId filter, only 1 item is displayed in the grid.
  // When we apply the NotEqualTo filter this item will disappear.
  kendoGrid.filter(
    new GridFilter(FreightColumnName, FilterOperator.NOT_EQUAL_TO, Double.toString(newItem.getFreight())),
    new GridFilter(OrderIdColumnName, FilterOperator.EQUAL_TO, newItem.getOrderId().toString()));
  waitForGridToLoad(0, kendoGrid);
  List < Order > results = kendoGrid.getItems();
  Assert.assertTrue(results.stream().count() == 0);
}

The arranging phase is identical. However, the other thing that we do is filter by the order id. This way, only the arranged order should be visible after the first filter. After that, we apply the NOT_EQUAL_TO filter and assert that no elements are visible in the grid.

Freight GREATER_THAN_OR_EQUAL_TO Filter

@Test
public void freightGreaterThanOrEqualToFilter() throws Exception {
  driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/filter-row");
  var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
  var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getFreight)).collect(Collectors.toList());
  var biggestFreight = allItems.stream().skip(allItems.stream().count() - 1).findFirst().get().getFreight();
  var newItem = createNewItemInDb();
  newItem.setFreight(BigDecimal.valueOf(biggestFreight + getUniqueNumberValue()).setScale(3, RoundingMode.HALF_UP).doubleValue());
  updateItemInDb(newItem);
  var secondNewItem = createNewItemInDb(newItem.getShipName());
  secondNewItem.setFreight(BigDecimal.valueOf(newItem.getFreight() + 1).setScale(3, RoundingMode.HALF_UP).doubleValue());
  updateItemInDb(secondNewItem);
  kendoGrid.filter(FreightColumnName, FilterOperator.GREATER_THAN_OR_EQUAL_TO, Double.toString(newItem.getFreight()));
  waitForGridToLoadAtLeast(2, kendoGrid);
  List < Order > results = kendoGrid.getItems();
  Assert.assertTrue(results.stream().count() == 2);
  // We assume that there isn't default sorting for this column so we cannot expect that the order will be the same every time.
  Assert.assertEquals(results.stream().filter(x -> x.getFreight() == secondNewItem.getFreight()).count(), 1);
  Assert.assertEquals(results.stream().filter(x -> x.getFreight() == newItem.getFreight()).count(), 1);
}

The arranging phase for this test is a little bit trickier. First, we get the biggest freight amount from the DB. Then create two new items. We make sure that we update the freight amount of the first element with a greater value than the currently largest freight. The second item’s freight value is bigger than the second item’s one. This way, we have two unique numbers located at the end of the array of all freights’ values. When we filter by the first item’s freight amount, we expect only our two new entities to be visible on the grid. If we want to extend the idea further, we can create a new third entity and assert that it is not displayed.

Freight GREATER_THAN Filter

@Test
public void freightGreaterThanFilter() throws Exception {
  driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/filter-row");
  var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
  var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getFreight)).collect(Collectors.toList());
  var biggestFreight = allItems.stream().skip(allItems.stream().count() - 1).findFirst().get().getFreight();
  var newItem = createNewItemInDb();
  newItem.setFreight(BigDecimal.valueOf(biggestFreight + getUniqueNumberValue()).setScale(3, RoundingMode.HALF_UP).doubleValue());
  updateItemInDb(newItem);
  var secondNewItem = createNewItemInDb(newItem.getShipName());
  secondNewItem.setFreight(BigDecimal.valueOf(newItem.getFreight() + 1).setScale(3, RoundingMode.HALF_UP).doubleValue());
  updateItemInDb(secondNewItem);
  kendoGrid.filter(FreightColumnName, FilterOperator.GREATER_THAN, Double.toString(newItem.getFreight()));
  waitForGridToLoadAtLeast(1, kendoGrid);
  List < Order > results = kendoGrid.getItems();
  Assert.assertTrue(results.stream().count() == 1);
  // We assume that there isn't default sorting for this column so we cannot expect that the order will be the same every time.
  Assert.assertEquals(results.stream().filter(x -> x.getFreight() == secondNewItem.getFreight()).count(), 1);
}

The only difference with the previous example is the type of the applied filter. When using the GREATER_THAN filter, we assert that only the second item is visible on the grid.

Freight LESS_THAN_OR_EQUAL_TO Filter

@Test
public void freightLessThanOrEqualToFilter() throws Exception {
  driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/filter-row");
  var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
  var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getFreight)).collect(Collectors.toList());
  var smallestFreight = allItems.stream().findFirst().get().getFreight();
  var newItem = createNewItemInDb();
  newItem.setFreight(BigDecimal.valueOf(smallestFreight - getUniqueNumberValue()).setScale(3, RoundingMode.HALF_UP).doubleValue());
  updateItemInDb(newItem);
  var secondNewItem = createNewItemInDb(newItem.getShipName());
  secondNewItem.setFreight(BigDecimal.valueOf(newItem.getFreight() - 0.01).setScale(3, RoundingMode.HALF_UP).doubleValue());
  updateItemInDb(secondNewItem);
  kendoGrid.filter(FreightColumnName, FilterOperator.LESS_THAN_OR_EQUAL_TO, Double.toString(newItem.getFreight()));
  waitForGridToLoadAtLeast(2, kendoGrid);
  List < Order > results = kendoGrid.getItems();
  Assert.assertTrue(results.stream().count() == 2);
  // We assume that there isn't default sorting for this column so we cannot expect that the order will be the same every time.
  Assert.assertEquals(results.stream().filter(x -> x.getFreight() == secondNewItem.getFreight()).count(), 1);
  Assert.assertEquals(results.stream().filter(x -> x.getFreight() == newItem.getFreight()).count(), 1);
}

The arranging phase for this test is similar to the ones for the GREATER_THAN filter. First, we create two new items. Then get the smallest freight amount from the DB. Next, we assign an even smaller new unique number to the first item’s freight. Using it, we initialize the second item’s freight with a lower value. When applying the filter, we assert that only these two elements are displayed.

Freight LESS_THAN Filter

@Test
public void freightLessThanFilter() throws Exception {
  driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/filter-row");
  var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
  var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getFreight)).collect(Collectors.toList());
  var smallestFreight = allItems.stream().findFirst().get().getFreight();
  var newItem = createNewItemInDb();
  newItem.setFreight(BigDecimal.valueOf(smallestFreight - getUniqueNumberValue()).setScale(3, RoundingMode.HALF_UP).doubleValue());
  updateItemInDb(newItem);
  var secondNewItem = createNewItemInDb(newItem.getShipName());
  secondNewItem.setFreight(BigDecimal.valueOf(newItem.getFreight() - 0.01).setScale(3, RoundingMode.HALF_UP).doubleValue());
  updateItemInDb(secondNewItem);
  kendoGrid.filter(FreightColumnName, FilterOperator.LESS_THAN, Double.toString(newItem.getFreight()));
  waitForGridToLoadAtLeast(1, kendoGrid);
  List < Order > results = kendoGrid.getItems();
  Assert.assertTrue(results.stream().count() == 1);
  // We assume that there isn't default sorting for this column so we cannot expect that the order will be the same every time.
  Assert.assertEquals(results.stream().filter(x -> x.getFreight() == secondNewItem.getFreight()).count(), 1);
}

The arrange is identical, at the end we assert that only the second item is visible.

Freight Clear Filter

@Test
public void freightClearFilter() throws Exception {
driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/filter-row");
var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getFreight)).collect(Collectors.toList());
var biggestFreight = allItems.stream().skip(allItems.stream().count() - 1).findFirst().get().getFreight();
var newItem = createNewItemInDb();
newItem.setFreight(biggestFreight + getUniqueNumberValue());
updateItemInDb(newItem);
var secondNewItem = createNewItemInDb(newItem.getShipName());
secondNewItem.setFreight(newItem.getFreight() + 1);
updateItemInDb(secondNewItem);
kendoGrid.filter(FreightColumnName, FilterOperator.EQUAL_TO, Double.toString(newItem.getFreight()));
waitForGridToLoad(1, kendoGrid);
kendoGrid.removeFilters();
waitForGridToLoadAtLeast(2, kendoGrid);
}

Here we create two new items. The first one has a unique freight. When we filter, it is the only element displayed on the grid. When we clear the applied filters, we assert that both entities are visible.

Design Grid Control’s Tests- Date Column

Six filters need to be automated- EQUAL_TO, NOT_EQUAL_TO, IS_AFTER, IS_AFTER_OR_EQUAL_TO, IS_BEFORE, IS_BEFORE_OR_EQUAL_TO. In addition, three additional test cases should be added- one for clearing the applied filters, sorting ascending, and sorting descending.

OrderDate EQUAL_TO Filter

@Test
public void orderDateEqualToFilter() throws Exception {
var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getOrderId)).collect(Collectors.toList());
var lastOrderDate = allItems.stream().skip(allItems.stream().count() - 1).findFirst().get().getOrderDate();
var newItem = createNewItemInDb();
newItem.setOrderDate(lastOrderDate.plusDays(1));
updateItemInDb(newItem);
kendoGrid.filter(OrderDateColumnName, FilterOperator.EQUAL_TO, newItem.getOrderDate().toString());
waitForGridToLoadAtLeast(1, kendoGrid);
List < Order > results = kendoGrid.getItems();
Assert.assertTrue(results.stream().count() == 1);
Assert.assertEquals(newItem.getOrderDate().toString(), results.get(0).getOrderDate());
}

We create a new item. Then we get the biggest order date from the DB. After that, update the latest item’s order date with the biggest order date + 1 day. This way, when you apply the EqualTo filter by order date, only the new item should be displayed. Again, if you want to run the tests against an empty DB, it is probably a good idea to create a second entity and make sure it is not visible.

OrderDate NOT_EQUAL_TO Filter

@Test
public void orderDateNotEqualToFilter() throws Exception {
var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getOrderDate)).collect(Collectors.toList());
var lastOrderDate = allItems.stream().skip(allItems.stream().count() - 1).findFirst().get().getOrderDate();
var newItem = createNewItemInDb();
newItem.setOrderDate(lastOrderDate.plusDays(1));
updateItemInDb(newItem);
var secondNewItem = createNewItemInDb(newItem.getShipName());
secondNewItem.setOrderDate(lastOrderDate.plusDays(2));
updateItemInDb(secondNewItem);
// After we filter by the unique shipping name, two items will be displayed in the grid.
// After we apply the date after filter only the second item should be visible in the grid.
kendoGrid.filter(
new GridFilter(OrderDateColumnName, FilterOperator.NOT_EQUAL_TO, newItem.getOrderDate().toString()),
new GridFilter(ShipNameColumnName, FilterOperator.EQUAL_TO, newItem.getShipName()));
waitForGridToLoadAtLeast(1, kendoGrid);
List < Order > results = kendoGrid.getItems();
Assert.assertTrue(results.stream().count() == 1);
Assert.assertEquals(secondNewItem.toString(), results.get(0).getOrderDate());
}

Here we create two new entities. Make sure that they have new bigger order dates than the largest date present in the DB. Also, the new items contain an identical new unique shipping name. The first filter we apply is by the shipping name. We expect that only the new entities should be displayed. With the second NOT_EQUAL_TO filter by the shipping name, we expect only the new objects to be shown. With the second NOT_EQUAL_TO filter, we can verify that only the second item is visible on the grid.

OrderDate IS_AFTER Filter

@Test
public void orderDateAfterFilter() throws Exception {
var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getOrderDate)).collect(Collectors.toList());
var lastOrderDate = allItems.stream().skip(allItems.stream().count() - 1).findFirst().get().getOrderDate();
var newItem = createNewItemInDb();
newItem.setOrderDate(lastOrderDate.plusDays(1));
updateItemInDb(newItem);
var secondNewItem = createNewItemInDb(newItem.getShipName());
secondNewItem.setOrderDate(lastOrderDate.plusDays(2));
updateItemInDb(secondNewItem);
// After we filter by the unique shipping name, two items will be displayed in the grid.
// After we apply the date after filter only the second item should be visible in the grid.
kendoGrid.filter(
new GridFilter(OrderDateColumnName, FilterOperator.IS_AFTER, newItem.getOrderDate().toString()),
new GridFilter(ShipNameColumnName, FilterOperator.EQUAL_TO, newItem.getShipName()));
waitForGridToLoadAtLeast(1, kendoGrid);
List < Order > results = kendoGrid.getItems();
Assert.assertTrue(results.stream().count() == 1);
Assert.assertEquals(secondNewItem.toString(), results.get(0).getOrderDate());
}

The arranging phase is the same as the one for the NOT_EQUAL_TO filter. The dates are arranged so that the first item’s date is before the second item’s one. So when we apply the After filter, only the second entity should be displayed.

OrderDate IS_AFTER_OR_EQUAL_TO Filter

@Test
public void orderDateIsAfterOrEqualToFilter() throws Exception {
driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/remote-data-binding");
var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getOrderDate)).collect(Collectors.toList());
var lastOrderDate = allItems.stream().skip(allItems.stream().count() - 1).findFirst().get().getOrderDate();
var newItem = createNewItemInDb();
newItem.setOrderDate(lastOrderDate.plusDays(1));
updateItemInDb(newItem);
var secondNewItem = createNewItemInDb(newItem.getShipName());
secondNewItem.setOrderDate(lastOrderDate.plusDays(2));
updateItemInDb(secondNewItem);
// After we filter by the unique shipping name, two items will be displayed in the grid.
// After we apply the date after filter only the second item should be visible in the grid.
kendoGrid.filter(
new GridFilter(OrderDateColumnName, FilterOperator.IS_AFTER_OR_EQUAL_TO, newItem.getOrderDate().toString()),
new GridFilter(ShipNameColumnName, FilterOperator.EQUAL_TO, newItem.getShipName()));
waitForGridToLoadAtLeast(2, kendoGrid);
List < Order > results = kendoGrid.getItems();
Assert.assertTrue(results.stream().count() == 2);
Assert.assertEquals(secondNewItem.toString(), results.get(0).getOrderDate());
Assert.assertEquals(newItem.toString(), results.get(1).getOrderDate());
}

Identical to the above example except we assert that both items are visible on the grid.

OrderDate IS_BEFORE Filter

@Test
public void orderDateBeforeFilter() throws Exception {
driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/remote-data-binding");
var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getOrderDate)).collect(Collectors.toList());
var lastOrderDate = allItems.stream().findFirst().get().getOrderDate();
var newItem = createNewItemInDb();
newItem.setOrderDate(lastOrderDate.plusDays(-1));
updateItemInDb(newItem);
var secondNewItem = createNewItemInDb(newItem.getShipName());
secondNewItem.setOrderDate(lastOrderDate.plusDays(-2));
updateItemInDb(secondNewItem);
// After we filter by the unique shipping name, two items will be displayed in the grid.
// After we apply the date after filter only the second item should be visible in the grid.
kendoGrid.filter(
new GridFilter(OrderDateColumnName, FilterOperator.IS_BEFORE, newItem.getOrderDate().toString()),
new GridFilter(ShipNameColumnName, FilterOperator.EQUAL_TO, newItem.getShipName()));
waitForGridToLoadAtLeast(1, kendoGrid);
List < Order > results = kendoGrid.getItems();
Assert.assertTrue(results.stream().count() == 1);
Assert.assertEquals(secondNewItem.toString(), results.get(0).getOrderDate());
}

The only difference from the After filters is that instead of adding days to the minor date, we subtract them. When we apply the IS_BEFORE_OR_EQUAL_TO filter, only the second item should be displayed.

OrderDate IS_BEFORE_OR_EQUAL_TO Filter

@Test
public void orderDateIsBeforeOrEqualToFilter() throws Exception {
driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/remote-data-binding");
var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getOrderDate)).collect(Collectors.toList());
var lastOrderDate = allItems.stream().findFirst().get().getOrderDate();
var newItem = createNewItemInDb();
newItem.setOrderDate(lastOrderDate.plusDays(-1));
updateItemInDb(newItem);
var secondNewItem = createNewItemInDb(newItem.getShipName());
secondNewItem.setOrderDate(lastOrderDate.plusDays(-2));
updateItemInDb(secondNewItem);
kendoGrid.filter(
new GridFilter(OrderDateColumnName, FilterOperator.IS_BEFORE_OR_EQUAL_TO, newItem.getOrderDate().toString()),
new GridFilter(ShipNameColumnName, FilterOperator.EQUAL_TO, newItem.getShipName()));
waitForGridToLoadAtLeast(2, kendoGrid);
List < Order > results = kendoGrid.getItems();
Assert.assertTrue(results.stream().count() == 2);
Assert.assertEquals(secondNewItem.toString(), results.get(0).getOrderDate());
Assert.assertEquals(newItem.toString(), results.get(1).getOrderDate());
}

Only the applied filter is different, asserting that both entities are shown. If you want to execute the tests against an empty DB, create a third new object; otherwise, you cannot be sure that the filter is doing the right thing.

OrderDate Clear Filter

@Test
public void orderDateClearFilter() throws Exception {
driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/remote-data-binding");
var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
var newItem = createNewItemInDb();
kendoGrid.filter(OrderDateColumnName, FilterOperator.IS_AFTER, LocalDateTime.MAX.toString());
waitForGridToLoad(0, kendoGrid);
kendoGrid.removeFilters();
waitForGridToLoadAtLeast(1, kendoGrid);
}

We create a new item. After that, we filter on a non-existing date. No items should be visible. When we remove the filter, the new item should be displayed.

OrderDate Sort Ascending

@Test
public void orderDateSortAsc() throws Exception {
driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/remote-data-binding");
var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getOrderDate)).collect(Collectors.toList());
var lastOrderDate = allItems.stream().findFirst().get().getOrderDate();
var newItem = createNewItemInDb();
newItem.setOrderDate(lastOrderDate.plusDays(-1));
updateItemInDb(newItem);
var secondNewItem = createNewItemInDb(newItem.getShipName());
secondNewItem.setOrderDate(lastOrderDate.plusDays(-2));
updateItemInDb(secondNewItem);
kendoGrid.filter(ShipNameColumnName, FilterOperator.EQUAL_TO, newItem.getShipName());
waitForGridToLoadAtLeast(2, kendoGrid);
kendoGrid.sort(OrderDateColumnName, SortType.ASC);
Thread.sleep(1000);
List < Order > results = kendoGrid.getItems();
Assert.assertTrue(results.stream().count() == 2);
Assert.assertEquals(secondNewItem.toString(), results.get(0).getOrderDate());
Assert.assertEquals(newItem.toString(), results.get(1).getOrderDate());
}

We apply the same arrangement as for the BEFORE filters. After the filter application, we sort ascending. At the end of the test, the items are asserted that are displayed in the correct order.

OrderDate Sort Decending

@Test
public void orderDateSortDesc() throws Exception {
driver.navigate().to("http://demos.telerik.com/kendo-ui/grid/remote-data-binding");
var kendoGrid = new KendoGrid(driver, driver.findElement(By.id("grid")));
var allItems = getAllItemsFromDb().stream().sorted(Comparator.comparing(Order::getOrderDate)).collect(Collectors.toList());
var lastOrderDate = allItems.stream().findFirst().get().getOrderDate();
var newItem = createNewItemInDb();
newItem.setOrderDate(lastOrderDate.plusDays(-1));
updateItemInDb(newItem);
var secondNewItem = createNewItemInDb(newItem.getShipName());
secondNewItem.setOrderDate(lastOrderDate.plusDays(-2));
updateItemInDb(secondNewItem);
kendoGrid.filter(ShipNameColumnName, FilterOperator.EQUAL_TO, newItem.getShipName());
waitForGridToLoadAtLeast(2, kendoGrid);
kendoGrid.sort(OrderDateColumnName, SortType.DESC);
Thread.sleep(1000);
List < Order > results = kendoGrid.getItems();
Assert.assertTrue(results.stream().count() == 2);
Assert.assertEquals(newItem.toString(), results.get(0).getOrderDate());
Assert.assertEquals(secondNewItem.toString(), results.get(1).getOrderDate());
}

Only the assert order of the entities is different and the applied filter.

Related Articles

Web Automation Java

Design Grid Control Automated Tests with Java Part 1

In the previous article, I showed you how to automate complex custom-tuned controls like a grid. In my article Automate Telerik Kendo Grid with WebDriver and Ja

Design Grid Control Automated Tests with Java Part 1

Resources, Web Automation Java

Most Complete Selenium WebDriver Java Cheat Sheet

As you know, I am a big fan of Selenium WebDriver. You can find tonnes of useful Java code in my Web Automation Java Series. I lead automated testing courses an

Most Complete Selenium WebDriver Java Cheat Sheet

Web Automation Java

Shadow DOM: Locating Elements with XPath Workaround

In this post, we will go through the basics of shadow DOM, its use, benefits, and constraints, and we will analyse the solution for them. As an Automation Engin

Shadow DOM: Locating Elements with XPath Workaround

Web Automation Java

Deep Dive into JUnit Assertions with WebDriver and Custom Assertions

JUnit assertions are a cornerstone of Java testing, enabling developers to write tests that verify code behavior. In this article, we'll explore the various JUn

Deep Dive into JUnit Assertions with WebDriver and Custom Assertions

Design Patterns, Web Automation Java

Mastering Parameterized Tests in JUnit with Selenium WebDriver

In the evolving landscape of software testing, efficiency and coverage are paramount. JUnit 5 introduces enhanced parameterized testing capabilities, allowing d

Mastering Parameterized Tests in JUnit with Selenium WebDriver

Web Automation Java

Playwright Tutorial: Mastering Element Locators

This article explores the various techniques Playwright offers for locating elements, including basic methods such as CSS selectors and text selectors, as well

Playwright Tutorial: Mastering Element Locators
Anton Angelov

About the author

Anton Angelov is Managing Director, Co-Founder, and Chief Test Automation Architect at Automate The Planet — a boutique consulting firm specializing in AI-augmented test automation strategy, implementation, and enablement. He is the creator of BELLATRIX, a cross-platform framework for web, mobile, desktop, and API testing, and the author of 8 bestselling books on test automation. A speaker at 60+ international conferences and researcher in AI-driven testing and LLM-based automation, he has been recognized as QA of the Decade and Webit Changemaker 2025.