You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f32bcb0
Browse filesBrowse the repository at this point in the historyBrowse files
Moli (https://github.com/lexmount/moli) is a Rust headless browser with V8
and Stylo, served over CDP. The helper is a thin CDPBrowser subclass like
Lightpanda: it self-launches `moli serve` on a free port, or attaches to an
explicit endpoint.
Moli runs without --layout on purpose: with --layout element geometry is
frozen on first read and only a screenshot refreshes it, which breaks
waitForVisible/waitForText. Presets pin synthetic input, layout 'real' and
no screenshots, since the runtime probe would otherwise pick coordinate
input that Moli rejects in this mode.
- shared webapi suite: 289 passing, 50 pending; 6 tests skipped with
verified reasons (clickXY, upload MIME type, link color)
- 19 acceptance scenarios tagged @Moli, including gherkin features
- CI workflow pinned to v1.1.17 with SHA256 check
- docs: alternative browsers, installation, README, helper reference
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@
12
12
| 🌐 Web | WebDriver |[](https://github.com/codeceptjs/CodeceptJS/actions/workflows/webdriver.yml)|
13
13
| 🌐 Web | Obscura |[](https://github.com/codeceptjs/CodeceptJS/actions/workflows/obscura.yml)|
14
14
| 🌐 Web | Lightpanda |[](https://github.com/codeceptjs/CodeceptJS/actions/workflows/lightpanda.yml)|
15
+
| 🌐 Web | Moli |[](https://github.com/codeceptjs/CodeceptJS/actions/workflows/moli.yml)|
15
16
| 📱 Mobile | Appium |[](https://github.com/codeceptjs/CodeceptJS/actions/workflows/appium_Android.yml)|
16
17
17
18
# CodeceptJS [](https://stand-with-ukraine.pp.ua)
@@ -46,6 +47,7 @@ CodeceptJS uses **Helper** modules to provide actions to `I` object. Currently,
46
47
-[**WebDriver**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/WebDriver.md) - uses [webdriverio](http://webdriver.io/) to run tests via WebDriver or Devtools protocol.
47
48
-[**Obscura**](https://codecept.io/helpers/Obscura) - drives the lightweight Obscura browser through Chrome DevTools Protocol. See [Alternative Browser Engines](https://codecept.io/alternative-browsers).
48
49
-[**Lightpanda**](https://codecept.io/helpers/Lightpanda) - drives the Lightpanda headless browser through Chrome DevTools Protocol. See [Alternative Browser Engines](https://codecept.io/alternative-browsers).
50
+
-[**Moli**](https://codecept.io/helpers/Moli) - drives the Moli headless browser through Chrome DevTools Protocol. See [Alternative Browser Engines](https://codecept.io/alternative-browsers).
49
51
-[**Appium**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Appium.md) - for **mobile testing** with Appium
50
52
-[**Detox**](https://github.com/codeceptjs/CodeceptJS/blob/master/docs/helpers/Detox.md) - This is a wrapper on top of Detox library, aimed to unify testing experience for CodeceptJS framework. Detox provides a grey box testing for mobile applications, playing especially well for React Native apps.
Copy file name to clipboardExpand all lines: docs/alternative-browsers.md
+56-1Lines changed: 56 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ title: Alternative Browser Engines
6
6
# Alternative Browser Engines
7
7
8
8
::: warning Experimental
9
-
The `Obscura`, `Lightpanda` and `Kitesurf` helpers are experimental. Keep a Playwright or WebDriver job for compatibility-critical tests.
9
+
The `Obscura`, `Lightpanda`, `Moli` and `Kitesurf` helpers are experimental. Keep a Playwright or WebDriver job for compatibility-critical tests.
10
10
:::
11
11
12
12
Playwright drives full Chromium, Firefox and WebKit: the most accurate way to test what users see, at the cost of a heavy browser per worker. Alternative engines trade part of that accuracy for speed, a small footprint, or cloud scale. They are a good fit for functional tests (text appears, form submits, redirect happens, cookie is set) and a poor one for anything visual.
@@ -143,6 +143,61 @@ Lightpanda: {
143
143
144
144
All options: [Lightpanda helper reference](/helpers/Lightpanda).
145
145
146
+
## Moli
147
+
148
+
[Moli](https://github.com/lexmount/moli) is an open-source headless browser built in Rust for automation. It runs your app's JavaScript in V8 and computes real CSS, but skips layout and painting, so it starts fast and stays small. Visibility checks such as `seeElement` and `waitForVisible` work.
149
+
150
+
Limitations:
151
+
152
+
- No screenshots: `saveScreenshot`, failure screenshots and the `screencast` plugin do not work.
153
+
-`clickXY` does not work.
154
+
-`attachFile` uploads files without a MIME type; the server receives `application/octet-stream`.
155
+
- Links have no default color: `a` computes `color: rgb(0, 0, 0)`.
156
+
157
+
### Setup
158
+
159
+
Install Moli following the [official instructions](https://github.com/lexmount/moli#direct-installation) and put `moli` on `PATH`. Then enable the helper:
160
+
161
+
```js
162
+
// codecept.conf.js
163
+
exportconstconfig= {
164
+
helpers: {
165
+
Moli: {
166
+
url:'http://localhost:3000',
167
+
},
168
+
},
169
+
}
170
+
```
171
+
172
+
If the binary is not on `PATH`, set `binaryPath` in the config or the `MOLI_PATH` environment variable.
173
+
174
+
### Usage
175
+
176
+
```sh
177
+
npx codeceptjs run
178
+
```
179
+
180
+
The helper starts `moli serve` on a free port before the first test and stops it after the last one. Each worker gets its own instance:
181
+
182
+
```sh
183
+
npx codeceptjs run-workers 8
184
+
```
185
+
186
+
To connect to a Moli you started yourself, set `endpoint`; the helper then never starts or stops it:
187
+
188
+
```sh
189
+
moli serve --host 127.0.0.1 --port 9222
190
+
```
191
+
192
+
```js
193
+
Moli: {
194
+
url:'http://localhost:3000',
195
+
endpoint:'http://127.0.0.1:9222',
196
+
}
197
+
```
198
+
199
+
All options: [Moli helper reference](/helpers/Moli).
200
+
146
201
## Kitesurf
147
202
148
203
[Kitesurf](https://blog.cloudflare.com/kitesurf/) is Cloudflare's browser running on Cloudflare Workers, with a real layout and rendering pipeline. Sessions start in about a second and nothing runs on your machine, so the number of parallel browsers is limited only by how far your suite splits.
0 commit comments