Package org.openqa.selenium.htmlunit
Interface HtmlUnitDriver.JavaScriptResultsCollection
-
- Enclosing class:
- HtmlUnitDriver
protected static interface HtmlUnitDriver.JavaScriptResultsCollectionRepresents a JavaScript array-like result set returned from script execution.This interface abstracts collection-like objects that may be returned from JavaScript (e.g., arrays, NodeLists, or custom JS collections). It provides minimal operations needed to iterate over such results.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetLength()Returns the number of items in the collection.Objectitem(int index)Returns the item at the specified index within the collection.
-
-
-
Method Detail
-
getLength
int getLength()
Returns the number of items in the collection.- Returns:
- the collection length
-
item
Object item(int index)
Returns the item at the specified index within the collection.- Parameters:
index- the zero-based index of the item to retrieve- Returns:
- the object at the specified index, or
nullif none exists
-
-