hyTags
HomeHome DocumentationDocumentation

selection-change

Changes the selected element using various navigation strategies.
Parameter
Type
Description
element
Element?
Element to select directly
global
Selector?
CSS selector to find element globally
parent
Selector?
CSS selector to find among parent elements
enclosing
Selector?
CSS selector to find enclosing element
first-child
Selector?
CSS selector to find among first children
last-child
Selector?
CSS selector to find among last children
first-descendant
Selector?
CSS selector to find first descendant
last-descendant
Selector?
CSS selector to find last descendant
next-sibling
Selector?
CSS selector to find among next siblings
previous-sibling
Selector?
CSS selector to find among previous siblings
return
void
Void
Test Case:Change selection to first child
    <div><span>child</span></div>
    
    <selection-change first-child="span">
    <selection-get-text>
    <assert-equal value="child" type="string">
    
    👆 Try to change something!
  • Test succeeded Test failed