Skip to content

Commit 8d8e5d5

Browse files
committed
Add mkdocs
1 parent 891404c commit 8d8e5d5

File tree

4 files changed

+86
-0
lines changed

4 files changed

+86
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# robotframework-heal
22
A Robot Framework Listener for library agnostic self-healing and smart recovery of tests
33

4+
📙 [Documentation](https://manykarim.github.io/robotframework-heal/) can be found [here](https://manykarim.github.io/robotframework-heal/)
5+
46
## Installation
57
```bash
68
pip install robotframework-heal
@@ -45,7 +47,14 @@ Login with valid credentials
4547
Get Text id=flash *= You logged into a secure area!
4648
```
4749

50+
## Arguments
4851

52+
* `fix`: Specifies the mode of operation, set to "realtime" for real-time healing. Default is "realtime".
53+
* `collect_locator_info`: Boolean flag to enable or disable the collection of locator information. Default is false.
54+
* `use_locator_db`: Boolean flag to enable or disable the use of a locator database. Default is false.
55+
* `use_llm_for_locator_proposals`: Boolean flag to enable or disable the use of a language model for generating locator proposals. Default is false.
56+
* `heal_assertions`: Boolean flag to enable or disable the healing of assertions. Default is false. (not implemented yet)
57+
* `locator_db_file`: Specifies the filename for the locator database. Default is "locator_db.json".
4958

5059
## Open the project in Gitpod.io
5160
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/manykarim/robotframework-heal)

docs/index.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Overview
2+
3+
A Robot Framework Listener for library agnostic self-healing and smart recovery of tests
4+
5+
## Installation
6+
```bash
7+
pip install robotframework-heal
8+
```
9+
10+
## Usage
11+
12+
Add `Library SelfHealing ` to your Robot Framework test suite `*** Settings ***` section.
13+
14+
```robotframework
15+
*** Settings ***
16+
Library SelfHealing
17+
```
18+
19+
Set up the following environment variables to enable the self-healing feature:
20+
21+
* `LLM_API_KEY`
22+
* `LLM_API_BASE`
23+
* `LLM_TEXT_MODEL` (model used for picking final locator from proposal list)
24+
* `LLM_LOCATOR_MODEL` (model for generating locator proposals from DOM tree)
25+
* `LLM_VISION_MODEL` (not working yet)
26+
27+
Interface with LLMs uses the [LiteLMM](https://docs.litellm.ai) API.
28+
Check the list of available [Providers](https://docs.litellm.ai/docs/providers) and how to connect to them.
29+
30+
31+
32+
```robotframework
33+
*** Settings ***
34+
Library Browser timeout=5s
35+
Library SelfHealing use_llm_for_locator_proposals=True
36+
Suite Setup New Browser browser=${BROWSER} headless=${HEADLESS}
37+
Test Setup New Context viewport={'width': 1280, 'height': 720}
38+
Test Teardown Close Context
39+
Suite Teardown Close Browser ALL
40+
41+
*** Variables ***
42+
${BROWSER} chromium
43+
${HEADLESS} True
44+
45+
*** Test Cases ***
46+
Login with valid credentials
47+
New Page https://the-internet.herokuapp.com/login
48+
Fill Text id=user tomsmith
49+
Fill Text id=pass SuperSecretPassword!
50+
Click id=loginbutton
51+
Get Text id=flash *= You logged into a secure area!
52+
```
53+
54+
## Arguments
55+
56+
* `fix`: Specifies the mode of operation, set to "realtime" for real-time healing. Default is "realtime".
57+
* `collect_locator_info`: Boolean flag to enable or disable the collection of locator information. Default is false.
58+
* `use_locator_db`: Boolean flag to enable or disable the use of a locator database. Default is false.
59+
* `use_llm_for_locator_proposals`: Boolean flag to enable or disable the use of a language model for generating locator proposals. Default is false.
60+
* `heal_assertions`: Boolean flag to enable or disable the healing of assertions. Default is false. (not implemented yet)
61+
* `locator_db_file`: Specifies the filename for the locator database. Default is "locator_db.json".

mkdocs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
site_name: Robot Framework Heal
2+
theme:
3+
name: material
4+
palette:
5+
scheme: slate
6+
features:
7+
- content.code.copy
8+
markdown_extensions:
9+
- pymdownx.highlight:
10+
anchor_linenums: true
11+
line_spans: __span
12+
pygments_lang_class: true
13+
- pymdownx.inlinehilite
14+
- pymdownx.snippets
15+
- pymdownx.superfences

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pytest = "*"
3434
invoke = "*"
3535
coverage = "*"
3636
robotframework-stacktrace = "*"
37+
mkdocs-material = "^9.6.3"
3738

3839
[build-system]
3940
requires = ["poetry-core"]

0 commit comments

Comments
 (0)