Skip to content

Commit 72324a1

Browse files
docs: updated the docs
1 parent 4b44a02 commit 72324a1

File tree

21 files changed

+449
-1267
lines changed

21 files changed

+449
-1267
lines changed

docs/README.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
# Mintlify Starter Kit
1+
# AUTO-Browse-TS (tpescript) Documentation
22

3-
Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including
4-
5-
- Guide pages
6-
- Navigation
7-
- Customizations
8-
- API Reference pages
9-
- Use of popular components
10-
11-
### Development
3+
The documentation for Auto-Browse-TS is hosted on [Auto-Browse Typescript](https://typescript.docs.auto-browse.com/introduction).
124

5+
## Contributing
6+
If you would like to contribute to the documentation, please follow these steps:
137
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
148

159
```
@@ -24,9 +18,4 @@ mintlify dev
2418

2519
### Publishing Changes
2620

27-
Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.
28-
29-
#### Troubleshooting
30-
31-
- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
32-
- Page loads as a 404 - Make sure you are running in a folder with `docs.json`
21+
Changes will be deployed to production automatically after pushing to the default branch.

docs/actions/verification.mdx

Lines changed: 88 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -1,266 +1,185 @@
11
---
22
title: "Verification Actions"
3-
description: "Learn how to verify page content and state using Auto-Browse"
3+
description: "Learn how to verify element states and content using Auto-Browse's assertions"
44
---
55

66
# Verification Actions
77

8-
Auto-Browse provides natural language commands for verifying page content, element states, and application behavior. This guide covers various verification scenarios and best practices.
8+
Auto-Browse provides a set of core assertions for verifying element states and content. These natural language commands make it easy to validate your application's behavior.
99

10-
## Basic Verification
10+
## Supported Assertions
1111

12-
Verify page elements and content:
12+
Auto-Browse currently supports four fundamental assertion types:
1313

14-
```typescript
15-
// Check element presence
16-
await auto("verify the login button is visible");
17-
await auto("check if error message is displayed");
18-
19-
// Verify text content
20-
await auto('verify page title is "Welcome"');
21-
await auto("check if success message contains order number");
22-
```
23-
24-
## Element State Verification
25-
26-
### Visibility States
27-
28-
```typescript
29-
// Basic visibility
30-
await auto("verify the menu is visible");
31-
await auto("check if loading spinner is hidden");
32-
33-
// Conditional visibility
34-
await auto("verify tooltip appears on hover");
35-
await auto("check if dropdown opens when clicked");
36-
```
37-
38-
### Element Properties
14+
### Element Visibility
3915

40-
```typescript
41-
// Attribute verification
42-
await auto('verify submit button is "disabled"');
43-
await auto("check if input field is required");
44-
45-
// Class verification
46-
await auto("verify error class is applied");
47-
await auto("check if menu item is active");
48-
```
49-
50-
### Input States
16+
Check if elements are visible on the page:
5117

5218
```typescript
53-
// Form field values
54-
await auto('verify email field contains "user@example.com"');
55-
await auto("check if password field is empty");
19+
// Verify element visibility
20+
await auto("verify the login button is visible");
21+
await auto("check if error message is displayed");
5622

57-
// Selection states
58-
await auto('verify "Terms" checkbox is checked');
59-
await auto('check if "Express Shipping" is selected');
23+
// Wait and verify
24+
await auto("wait for loading spinner to disappear");
25+
await auto("verify success message becomes visible");
6026
```
6127

62-
## Content Verification
63-
6428
### Text Content
6529

30+
Verify the text content of elements:
31+
6632
```typescript
6733
// Exact text matching
6834
await auto('verify heading text is "Welcome"');
69-
await auto('check if error says "Invalid input"');
35+
await auto('check if error message says "Invalid input"');
7036

71-
// Partial text matching
72-
await auto("verify message contains order ID");
73-
await auto("check if description includes product name");
37+
// Dynamic content
38+
await auto("verify message contains order number");
39+
await auto("check if username is displayed correctly");
7440
```
7541

76-
### Rich Content
77-
78-
```typescript
79-
// HTML content
80-
await auto("verify formatted text is bold");
81-
await auto("check if link contains correct href");
82-
83-
// Media content
84-
await auto("verify image is loaded");
85-
await auto("check if video is playing");
86-
```
42+
### Element State
8743

88-
## Page State Verification
89-
90-
### URL Verification
91-
92-
```typescript
93-
// Basic URL checks
94-
await auto("verify URL is /dashboard");
95-
await auto("check if URL contains user ID");
96-
97-
// Query parameters
98-
await auto('verify search parameter is "active"');
99-
await auto("check if filter parameters are correct");
100-
```
101-
102-
### Document State
44+
Check if elements are enabled:
10345

10446
```typescript
105-
// Page load state
106-
await auto("verify page is fully loaded");
107-
await auto("check if all resources are loaded");
47+
// Button states
48+
await auto("verify submit button is enabled");
49+
await auto("check if save button is clickable");
10850

109-
// Document properties
110-
await auto("verify page title is correct");
111-
await auto("check if meta description is set");
51+
// Input field states
52+
await auto("verify email field is enabled");
53+
await auto("check if password field is active");
11254
```
11355

114-
## Dynamic Content Verification
56+
### Checkbox/Radio State
11557

116-
### Loading States
58+
Verify if checkboxes or radio buttons are checked:
11759

11860
```typescript
119-
// Loading indicators
120-
await auto("verify loading state is complete");
121-
await auto("check if skeleton loader is hidden");
61+
// Checkbox verification
62+
await auto('verify "Remember me" checkbox is checked');
63+
await auto('check if "Terms" box is selected');
12264

123-
// Content updates
124-
await auto("verify new content is loaded");
125-
await auto("check if list is updated");
126-
```
127-
128-
### Async Operations
129-
130-
```typescript
131-
// Operation completion
132-
await auto("verify form submission completed");
133-
await auto("check if data is saved");
134-
135-
// State transitions
136-
await auto("verify transition is complete");
137-
await auto("check if animation finished");
65+
// Radio button verification
66+
await auto('verify "Express shipping" is selected');
67+
await auto('check if "Credit card" option is checked');
13868
```
13969

14070
## Best Practices
14171

142-
### 1. Clear Assertions
72+
### 1. Clear and Specific Assertions
14373

14474
```typescript
145-
// Good - Specific and clear
146-
await auto("verify login button shows 'Sign In'");
75+
// Good - Clear what to verify
76+
await auto('verify login button shows "Sign In"');
77+
await auto("check if error message is visible");
14778

14879
// Less Clear - Ambiguous
149-
await auto("check button text");
80+
await auto("verify button");
81+
await auto("check text");
15082
```
15183

152-
### 2. Proper Waiting
84+
### 2. Proper Wait States
15385

15486
```typescript
15587
// Good - Waits for state
156-
await auto("verify data loads and table shows 10 rows");
88+
await auto("wait for button to be enabled then verify");
89+
await auto("verify message appears after loading");
15790

158-
// Better - With explicit waiting
159-
await auto("wait for table to load");
160-
await auto("verify table has 10 rows");
91+
// Not Recommended - No wait
92+
await auto("verify button is enabled");
16193
```
16294

163-
### 3. Error Messages
95+
### 3. Error Handling
16496

16597
```typescript
166-
// Good - Descriptive error state
167-
await auto('verify error shows "Please enter valid email"');
168-
169-
// Better - With state check
170-
await auto("verify email field shows error state");
171-
await auto("check if error message is correct");
98+
try {
99+
await auto("verify form submission succeeded");
100+
} catch (error) {
101+
// Handle specific assertion failures
102+
if (error.message.includes("not visible")) {
103+
await auto("check if error message is shown");
104+
}
105+
}
172106
```
173107

174108
## Common Patterns
175109

176110
### 1. Form Validation
177111

178112
```typescript
179-
async function verifyFormValidation() {
113+
async function validateForm() {
180114
// Check initial state
181-
await auto("verify form is empty");
115+
await auto("verify submit button is enabled");
182116

183117
// Submit empty form
184118
await auto("click submit");
185-
await auto("verify required field errors are shown");
186-
187-
// Fill invalid data
188-
await auto('type "invalid" in email field');
189-
await auto("verify email format error is shown");
119+
await auto("verify error message is visible");
120+
await auto('check if error says "Required fields missing"');
190121
}
191122
```
192123

193-
### 2. Navigation State
124+
### 2. Login Flow
194125

195126
```typescript
196-
async function verifyNavigation() {
197-
// Check navigation state
198-
await auto("verify current page is dashboard");
199-
await auto("check if active menu item is correct");
127+
async function verifyLogin() {
128+
// Pre-login state
129+
await auto("verify login button is visible");
200130

201-
// Verify breadcrumbs
202-
await auto("verify breadcrumb shows correct path");
131+
// After login
132+
await auto('type "user@example.com" in email');
133+
await auto('type "password" in password');
134+
await auto("click login");
135+
await auto("verify welcome message is visible");
203136
}
204137
```
205138

206-
### 3. Data Display
139+
### 3. Interactive Elements
207140

208141
```typescript
209-
async function verifyDataDisplay() {
210-
// Check data loading
211-
await auto("verify data table is populated");
212-
await auto("check if sorting is applied");
213-
214-
// Verify content
215-
await auto("verify all columns are visible");
216-
await auto("check if data formatting is correct");
217-
}
218-
```
142+
async function verifyInteractions() {
143+
// Button states
144+
await auto("verify button is enabled");
145+
await auto("click button");
219146

220-
## Error Handling
221-
222-
Handle verification failures:
223-
224-
```typescript
225-
try {
226-
await auto("verify payment is processed");
227-
} catch (error) {
228-
// Check for specific failure cases
229-
await auto("check if payment is pending");
230-
await auto("verify no error message is shown");
147+
// Checkbox interactions
148+
await auto("click remember me checkbox");
149+
await auto("verify checkbox is checked");
231150
}
232151
```
233152

234153
## Troubleshooting
235154

236155
Common verification issues and solutions:
237156

238-
1. **Timing Issues**
157+
1. **Visibility Issues**
239158

240159
```typescript
241-
// Handle async content
242-
await auto("wait for content to stabilize");
243-
await auto("verify content is updated");
160+
// Handle element visibility
161+
await auto("scroll element into view");
162+
await auto("verify element is visible");
244163
```
245164

246-
2. **State Inconsistencies**
165+
2. **Timing Issues**
247166

248167
```typescript
249-
// Reset and retry
250-
await auto("refresh the page");
251-
await auto("verify expected state");
168+
// Handle loading states
169+
await auto("wait for loading to complete");
170+
await auto("verify content is visible");
252171
```
253172

254-
3. **Dynamic Content**
173+
3. **State Changes**
255174

256175
```typescript
257-
// Handle changing content
258-
await auto("wait for dynamic content");
259-
await auto("verify content matches pattern");
176+
// Handle dynamic states
177+
await auto("click to change state");
178+
await auto("verify new state is correct");
260179
```
261180

262181
## Next Steps
263182

264183
- Learn about [Form Actions](/actions/forms)
265184
- Explore [Navigation](/actions/navigation)
266-
- Check out [Error Handling](/actions/troubleshooting)
185+
- Check out other [Action Types](/actions/clicking)

docs/api-reference/endpoint/create.mdx

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/api-reference/endpoint/delete.mdx

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)