-
-
Notifications
You must be signed in to change notification settings - Fork 2k
waitForResultCount() is not defined error in Karate 2.0.0 #2760
Copy link
Copy link
Open
Description
Summary
The UI testing docs mention waitForResultCount() as a built-in DSL helper, but there is an error waitForResultCount() is not defined error in Karate 2.0.0.
Investigation
It looks like the driver API contains waitForResultCount(), but it is not exposed to the DSL.
Method in Driver.java
karate/karate-core/src/main/java/io/karatelabs/driver/Driver.java
Lines 804 to 812 in f4e7d16
| /** | |
| * Wait for a specific number of elements to match. | |
| */ | |
| List<Element> waitForResultCount(String locator, int count); | |
| /** | |
| * Wait for a specific number of elements to match with custom timeout. | |
| */ | |
| List<Element> waitForResultCount(String locator, int count, Duration timeout); |
There is not WAIT_FOR_RESULT_COUNT in wait methods to be bound in DriverApi.java
karate/karate-core/src/main/java/io/karatelabs/driver/DriverApi.java
Lines 35 to 40 in f4e7d16
| // Wait methods | |
| public static final String WAIT_FOR = "waitFor"; | |
| public static final String WAIT_FOR_TEXT = "waitForText"; | |
| public static final String WAIT_FOR_ENABLED = "waitForEnabled"; | |
| public static final String WAIT_FOR_URL = "waitForUrl"; | |
| public static final String WAIT_UNTIL = "waitUntil"; |
Reference
https://docs.karatelabs.io/extensions/ui-testing#waitforresultcount
Reactions are currently unavailable