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 IntegergetNodeId(Integer context, String selector, Object... args)default IntegergetNodeId(String selector)default StringgetObjectId(Integer contextId, String selector, Object... args)default StringgetObjectId(String selector)default StringgetObjectId(String selector, Object... args)default List<String>getObjectIds(String selector)default List<String>getObjectIds(String selector, Object... args)default StringgetObjectIdWithContext(Integer contextId, String selector, Object... args)default ObjectgetProperty(String selector, String propertyName)Gets the property value of the matched elementdefault ObjectgetProperty(String selector, String propertyName, Object... args)Gets the property value of the matched elementdefault ObjectgetPropertyByObjectId(String objectId, String name)Gets the property value of the matched elementdefault PropertyDescriptorgetPropertyDescriptor(String objectId, String name)SessiongetThis()default booleanmatches(Integer contextId, String selector, Object... args)This method returnstrueif the element would be selected by the specified selector string; otherwise, returnsfalse.default booleanmatches(String selector)This method returnstrueif the element would be selected by the specified selector string; otherwise, returnsfalse.default booleanmatches(String selector, Object... args)This method returnstrueif the element would be selected by the specified selector string; otherwise, returnsfalse.default SessionreleaseObject(String objectId)default voidsetProperty(String selector, String propetyName, Object value)Sets the property value of the matched elementdefault voidsetProperty(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 returnstrueif the element would be selected by the specified selector string; otherwise, returnsfalse.- Parameters:
selector- css or xpath selectorargs- format string- Returns:
trueif the element selected by the specified selector
-
matches
default boolean matches(String selector, Object... args)
This method returnstrueif the element would be selected by the specified selector string; otherwise, returnsfalse.- Parameters:
selector- css or xpath selectorargs- format string- Returns:
trueif the element selected by the specified selector
-
matches
default boolean matches(Integer contextId, String selector, Object... args)
This method returnstrueif the element would be selected by the specified selector string; otherwise, returnsfalse.- Parameters:
selector- css or xpath selectorargs- format string- Returns:
trueif 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()
-
-