diff --git a/src/main/java/com/sdl/selenium/extjs6/form/Tag.java b/src/main/java/com/sdl/selenium/extjs6/form/Tag.java index 22f469b6..4e912436 100644 --- a/src/main/java/com/sdl/selenium/extjs6/form/Tag.java +++ b/src/main/java/com/sdl/selenium/extjs6/form/Tag.java @@ -30,6 +30,19 @@ public boolean removeAll() { return removed; } + public boolean doRemoveAll() { + boolean removed; + WebLocator item = new WebLocator(list).setClasses("x-tagfield-item"); + int size = item.size(); + if(size > 0) { + WebLocator closeEl = new WebLocator(item).setClasses("x-tagfield-item-close"); + removed = RetryUtils.retry(size, () -> closeEl.doClick() && !item.ready(Duration.ofMillis(500))); + } else { + removed = true; + } + return removed; + } + public boolean remove(String... values) { boolean removed = true; for (String value : values) {