Skip to content

Commit 722c4ee

Browse files
committed
Add new shortcut method CanFindElements#waitForFirstByClassName
1 parent d5b0a08 commit 722c4ee

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.0.5
2+
* Add new shortcut method ``CanFindElements#waitForFirstByClassName``
3+
* Updated dependencies
4+
15
# 1.0.4
26
* ``ImprovedWebElement#hasAttribute`` now waits for loading operations to complete (now calls ``prepareForOperation`` - like ``getProperty`` already does)
37

selenium-elements/src/main/java/software/xdev/selenium/elements/CanFindElements.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ default WebElement waitForFirst(final By by)
6565
return this.waitUntil(wd -> this.determineSearchContext(wd).findElement(by));
6666
}
6767

68+
default WebElement waitForFirstByClassName(final String className)
69+
{
70+
return this.waitForFirst(By.cssSelector("." + className));
71+
}
72+
6873
default <T extends WebElement> T waitForFirst(final Class<T> clazz)
6974
{
7075
return this.waitForFirst(clazz, null);

0 commit comments

Comments
 (0)