Skip to content

Commit 665b557

Browse files
authored
Remove unsupported selectors
1 parent e7f75b9 commit 665b557

1 file changed

Lines changed: 1 addition & 59 deletions

File tree

src/scripting.md

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ navigate not-a-comment.com
9090

9191
### Selectors
9292

93-
Commands like [`click`](#click), [`setValue`](#setvalue), and others operate on DOM elements. To select a DOM element, use the following selectors:
94-
95-
#### `<attribute>=<value>`
93+
Commands like [`click`](#click), [`setValue`](#setvalue), and others operate on DOM elements. To select a DOM element, use the `<attribute>=<value>` selector.
9694

9795
This selector selects elements based on their HTML attributes. For the following input:
9896

@@ -117,62 +115,6 @@ Example:
117115
setValue type=email darth@vader.com
118116
```
119117

120-
#### `innerText=<text>`
121-
122-
This selector selects elements based on its inner text. For the following button:
123-
124-
```html
125-
<button type="submit">Login</button>
126-
```
127-
128-
the following selectors will work:
129-
130-
*`innerText=Login`
131-
132-
and the following selectors will not:
133-
134-
*`innerText=login` (the selector is case sensitive)
135-
*`innerText=log` (the selector must match the full string)
136-
137-
Also, for a different button, this will not work either:
138-
139-
*`innerText=log in` (spaces inside the text are not supported)
140-
141-
Example:
142-
143-
```markup
144-
// Click the Login button
145-
click innerText=Login
146-
```
147-
148-
#### `innerHtml=<html>`
149-
150-
This selector selects elements based on its inner HTML. For the following link:
151-
152-
```html
153-
<a href="/dashboard"><span>Dashboard</span></button>
154-
```
155-
156-
the following selectors will work:
157-
158-
*`innerHtml=<span>Dashboard</span>`
159-
160-
and the following selectors will not:
161-
162-
*`innerHtml=<span>dashboard</span>` (the selector is case sensitive)
163-
*`innerHtml=span` (you can’t select just on tags)
164-
165-
Also, for a different link, this will not work either:
166-
167-
*`innerText=<span>Open Dashboard</span>` (spaces inside the HTML are not supported)
168-
169-
Example:
170-
171-
```markup
172-
// Click the Dashboard link
173-
click innerHtml=<span>Dashboard</span>
174-
```
175-
176118
### Variable substitutions
177119

178120
Some variables are replaced based on the URL provided for the test.

0 commit comments

Comments
 (0)