Skip to content

Commit 373ba6d

Browse files
committed
feat: CarInsurance
1 parent bf64cfa commit 373ba6d

40 files changed

Lines changed: 1302 additions & 82 deletions
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# web-carinsurance
2+
3+
{% include 'how-to-run.partial.md' %}
4+
5+
## About this Robot Framework test
6+
7+
Automates a full car insurance quote workflow on the [Tricentis sample application](http://sampleapp.tricentis.com/)
8+
using [robotframework-browser](https://robotframework-browser.org) (Playwright).
9+
Covers the complete process from vehicle and insurant data entry through product configuration, price selection, and quote submission via email.
10+
11+
## Test Cases
12+
13+
| Test Case | Description |
14+
| --- | --- |
15+
| `Create Quote for Car` | Fills in vehicle data, insurant details, product options, selects a price tier, and submits the quote by email |
16+
17+
## Key Files
18+
19+
- `suite.robot` — all test cases and keywords in one file
20+
- `Resources/BrowserCommon.resource` — shared `Browser Init` keyword (headless-aware via `ROBOTMK_HEADLESS_HOST`)
21+
22+
## Links
23+
24+
### General links & Documentation
25+
26+
- [Tricentis Sample App](http://sampleapp.tricentis.com/)
27+
- [robotframework-browser](https://robotframework-browser.org)
28+
- [Robotmk Homepage](https://robotmk.org)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*** Settings ***
2+
Library Browser
3+
... enable_playwright_debug=disabled
4+
... auto_delete_passed_tracing=True
5+
... run_on_failure=Take A Screenshot
6+
7+
8+
*** Keywords ***
9+
10+
Browser Init
11+
# If there is no env var ROBOTMK_HEADLESS_HOST, always show the UI
12+
New Browser headless=%{ROBOTMK_HEADLESS_HOST=false} slowMo=750ms
13+
14+
Session Init
15+
[Arguments] ${url}
16+
New Context locale=en-US
17+
New Page ${url}
18+
19+
Take A Screenshot
20+
Take Screenshot EMBED fileType=jpeg quality=80
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copier template for the cryptolibrary example.
2+
# Maintainer-only: generates examples/cryptolibrary/ from this template.
3+
# The conda.yaml is injected automatically from _dev/_environments/ based on RMKS_ENVIRONMENT.
4+
# Run via: task generate
5+
6+
_subdirectory: template
7+
_answers_file: .copier-answers.yml
8+
9+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This file is managed by Copier.
2+
# Do NOT edit manually. To regenerate: task generate
3+
_src_path: {{ _copier_conf.src_path }}
4+
_commit: {{ _copier_conf.commit or 'none' }}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ── robotmk-starter ──────────────────────────────────────────────────────────
2+
# RCC environment
3+
RMKS_ENVIRONMENT=rf-libbrowser
4+
# Devcontainer type
5+
RMKS_DEVCONTAINER=desktop
6+
7+
# ── Environment ───────────────────────────────────────────────────────────────
8+
# VNC desktop resolution (default: 1280x1024 if not set)
9+
# VNC_RESOLUTION=1920x1080
10+
ROBOTMK_HEADLESS_HOST=true
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
*** Settings ***
2+
Library Browser timeout=20s
3+
4+
5+
*** Keywords ***
6+
7+
Browser Init
8+
# If there is no env var ROBOTMK_HEADLESS_HOST, always show the UI
9+
New Browser headless=%{ROBOTMK_HEADLESS_HOST=false} slowMo=1s
10+
11+
Session Init
12+
[Arguments] ${url}
13+
New Context locale=en-US
14+
New Page ${url}
15+
16+
Take A Screenshot
17+
Take Screenshot EMBED fileType=jpeg quality=80
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
*** Settings ***
2+
Library Browser timeout=20s
3+
4+
*** Keywords ***
5+
6+
#Login
7+
# # Fill in username/password, login and verify that it was successful (Customize button is visible)
8+
# Fill Text id=input_user cmkadmin
9+
# Fill Text id=input_pass cmk
10+
# Click id=_login
11+
# Wait For Condition Text body contains Customize
12+
13+
Login
14+
[Arguments] ${username} ${password}
15+
# Fill in username/password, login and verify that it was successful (Customize button is visible)
16+
Fill Text id=input_user cmkadmin
17+
Fill Text id=input_pass cmk
18+
Click id=_login
19+
Wait For Condition Text body contains Customize
20+
21+
Open All Hosts
22+
# Open All hosts view
23+
Click text="Monitor"
24+
Click text="All hosts"
25+
26+
#Verify Monitored Host
27+
# # The ">>>" operator lets us access elements inside iframes
28+
# # Verify that there is a host "127.0.0.1"
29+
# Wait For Condition Text iframe[name=main] >>> body contains 127.0.0.1
30+
31+
Verify Monitored Host
32+
[Arguments] ${host}
33+
# The ">>>" operator lets us access elements inside iframes
34+
# Verify that there is a host "127.0.0.1"
35+
Wait For Condition Text iframe[name=main] >>> body contains ${host}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
channels:
2+
- conda-forge
3+
dependencies:
4+
- python=3.12
5+
- pip=23.2.1
6+
- nodejs=22.11.0
7+
- pip:
8+
- robotframework==7.4
9+
- robotframework-browser==19.14.2
10+
11+
# Install Browser Library binaries after environment creation.
12+
rccPostInstall:
13+
- rfbrowser init
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[env]
2+
3+
# Used in the robot file to determine whether headless should be true or false.
4+
# Fallback is the value of this variable => show the UI
5+
ROBOTMK_HEADLESS_HOST="false"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
tasks:
2+
# Tasks are preconfigured commands which can be run from the command line.
3+
# (Robotmk does not use them at all, but executes custom Robot Framework commands inside of "rcc task shell")
4+
noexec:
5+
shell: echo "not for execution as RCC task"
6+
7+
condaConfigFile: conda.yaml
8+
artifactsDir: output
9+
ignoreFiles:
10+
- .gitignore

0 commit comments

Comments
 (0)