Package io.webfolder.cdp.session
Interface Selector
-
- All Known Implementing Classes:
Session
public interface Selector
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Integer
getNodeId(Integer context, String selector, Object... args)
default Integer
getNodeId(String selector)
default String
getObjectId(Integer contextId, String selector, Object... args)
default String
getObjectId(String selector)
default String
getObjectId(String selector, Object... args)
default List<String>
getObjectIds(String selector)
default List<String>
getObjectIds(String selector, Object... args)
default String
getObjectIdWithContext(Integer contextId, String selector, Object... args)
default Object
getProperty(String selector, String propertyName)
Gets the property value of the matched elementdefault Object
getProperty(String selector, String propertyName, Object... args)
Gets the property value of the matched elementdefault Object
getPropertyByObjectId(String objectId, String name)
Gets the property value of the matched elementdefault PropertyDescriptor
getPropertyDescriptor(String objectId, String name)
Session
getThis()
default boolean
matches(Integer contextId, String selector, Object... args)
This method returnstrue
if the element would be selected by the specified selector string; otherwise, returnsfalse
.default boolean
matches(String selector)
This method returnstrue
if the element would be selected by the specified selector string; otherwise, returnsfalse
.default boolean
matches(String selector, Object... args)
This method returnstrue
if the element would be selected by the specified selector string; otherwise, returnsfalse
.default Session
releaseObject(String objectId)
default void
setProperty(String selector, String propetyName, Object value)
Sets the property value of the matched elementdefault void
setProperty(String selector, String propertyName, Object value, Object... args)
Sets the property value of the matched element
-
-
-
Method Detail
-
matches
default boolean matches(String selector)
This method returnstrue
if the element would be selected by the specified selector string; otherwise, returnsfalse
.- Parameters:
selector
- css or xpath selectorargs
- format string- Returns:
true
if the element selected by the specified selector
-
matches
default boolean matches(String selector, Object... args)
This method returnstrue
if the element would be selected by the specified selector string; otherwise, returnsfalse
.- Parameters:
selector
- css or xpath selectorargs
- format string- Returns:
true
if the element selected by the specified selector
-
matches
default boolean matches(Integer contextId, String selector, Object... args)
This method returnstrue
if the element would be selected by the specified selector string; otherwise, returnsfalse
.- Parameters:
selector
- css or xpath selectorargs
- format string- Returns:
true
if the element selected by the specified selector
-
getProperty
default Object getProperty(String selector, String propertyName)
Gets the property value of the matched element- Parameters:
selector
- css or xpath selectorpropertyName
- property name- Returns:
- property value
-
getProperty
default Object getProperty(String selector, String propertyName, Object... args)
Gets the property value of the matched element- Parameters:
selector
- css or xpath selectorpropertyName
- property nameargs
- format string- Returns:
- property value
-
setProperty
default void setProperty(String selector, String propetyName, Object value)
Sets the property value of the matched element- Parameters:
selector
- css or xpath selectorpropertyName
- property namevalue
- property value
-
setProperty
default void setProperty(String selector, String propertyName, Object value, Object... args)
Sets the property value of the matched element- Parameters:
selector
- css or xpath selectorpropertyName
- property namevalue
- property valueargs
- format string
-
getPropertyDescriptor
default PropertyDescriptor getPropertyDescriptor(String objectId, String name)
-
getPropertyByObjectId
default Object getPropertyByObjectId(String objectId, String name)
Gets the property value of the matched element- Parameters:
selector
- css or xpath selectorpropertyName
- property name- Returns:
- property value
-
getObjectIdWithContext
default String getObjectIdWithContext(Integer contextId, String selector, Object... args)
-
getThis
Session getThis()
-
-