Typed Selector (Sel)

in Japanese(日本語)

A selector expression is a single string, so a typo can't be caught by the compiler — only by the runtime syntax check. Sel is a type-checked, autocompleted way to write the same selector notation, offered alongside the string form (not a replacement for it).

Examples

tap(.id("login_btn"))                            // #login_btn
tap(.id("login_btn").or(.text("Log In")))         // #login_btn||Log In
tap(.id("list").find(.type(.cell).nth(2)))        // #list >> .cell[2]
tap(.text("Notification").right(.switch))         // Notification:rightSwitch
exist(.type(.button).text("Save", .contains))     // .button&&textContains=Save
tap(.type(.button).not(.text("Cancel")))           // .button&&text!=Cancel

Every command that takes a selector has both a String overload and a Sel overload — use whichever reads better in a given line; they build the exact same underlying locator, so execution, reporting, and self-healing behave identically either way.

Vocabulary

Filter methods (.text, .type, .nth, …) always apply to the current target: before a relative step that's the anchor, after a relative step that's the resolved candidate.

Notes

See Selector expression for the full notation this maps to.