https://github.com/macrat/ayd-web-scenario-scheme
A headless browser controller for Ayd status monitoring tool.
https://github.com/macrat/ayd-web-scenario-scheme
alerting ayd headless-browser monitoring
Last synced: 26 days ago
JSON representation
A headless browser controller for Ayd status monitoring tool.
- Host: GitHub
- URL: https://github.com/macrat/ayd-web-scenario-scheme
- Owner: macrat
- License: mit
- Created: 2022-10-08T14:51:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-12T05:50:54.000Z (over 2 years ago)
- Last Synced: 2024-06-22T06:47:21.777Z (over 1 year ago)
- Topics: alerting, ayd, headless-browser, monitoring
- Language: Go
- Homepage:
- Size: 1.18 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ayd Web-Scenario
================
A headless browser controller for [Ayd](https://github.com/macrat/ayd) status monitoring tool.
- [Quick Start](#quick-start)
- [Reference](REFERENCE.md)
## Quick Start
### 1. Install
~~Download a plugin binary from [release page](https://github.com/macrat/ayd-web-scenario-scheme/releases).~~ (pre built binary is not yet released)
And place binary to some directory that is included in PATH environment variable.
### 2. Make a scenario
A scenario is a script to control headless browser, written in [Lua](https://www.lua.org/).
A scenario looks lie above.
``` lua
t = tab.new("https://your-service.example.com")
t("input[name=username]"):sendKeys("test-id")
t("input[name=password]"):sendKeys("test-password")
t("input[type=submit]"):click()
assert.eq(t("h1").text, "welcome test-id!")
```
Please see also [reference](reference.md) for more information about features you can use in the scenario.
You can use REPL mode for testing how to write scenario. Please execute `ayd-web-scenario-scheme` without any argument.
### 3. Test scenario in standalone mode
If you passed file path instead of URL, web-scenario works in the standalone mode that shows logs more readable style.
You can use `--head` flag for check what is going on on the window, and/or `--debug` flag for get more detail information.
``` shell
$ ayd-web-scenario-scheme /path/to/scenario.lua
```
### 4. Schedule using Ayd
You can use Web-Scenario as a plugin of Ayd for monitoring web services.
``` shell
$ ayd web-scenario:/path/to/scenario.lua
```