{"id":25244906,"url":"https://github.com/elirianne/robocon25-examples","last_synced_at":"2025-04-05T21:16:19.975Z","repository":{"id":276993955,"uuid":"924224330","full_name":"Elirianne/robocon25-examples","owner":"Elirianne","description":"Examples of flattening topl-level keywords by Robot Framework API and other tools","archived":false,"fork":false,"pushed_at":"2025-03-01T22:09:48.000Z","size":6,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T21:16:13.573Z","etag":null,"topics":["examples","listener","robocon-2025","robotframework","visitor"],"latest_commit_sha":null,"homepage":"","language":"RobotFramework","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Elirianne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-29T16:26:55.000Z","updated_at":"2025-03-03T07:43:59.000Z","dependencies_parsed_at":"2025-02-11T15:44:31.956Z","dependency_job_id":null,"html_url":"https://github.com/Elirianne/robocon25-examples","commit_stats":null,"previous_names":["elirianne/robocon25-examples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elirianne%2Frobocon25-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elirianne%2Frobocon25-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elirianne%2Frobocon25-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elirianne%2Frobocon25-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Elirianne","download_url":"https://codeload.github.com/Elirianne/robocon25-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399884,"owners_count":20932880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["examples","listener","robocon-2025","robotframework","visitor"],"created_at":"2025-02-12T01:55:41.862Z","updated_at":"2025-04-05T21:16:19.969Z","avatar_url":"https://github.com/Elirianne.png","language":"RobotFramework","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flattening Top-Level Keywords with Robot Framework API\n\nThis repository contains simple showcases of flattening the top level keywords of a test case using the Robot Framework API's `Listener` and the `Result Visitor`, as well as a third-party library for parsing XML.\n\n\u003e [!NOTE]\n\u003e Examples are simplified for the purpose of the presentation at the RoboCon 2025 conference\n\u003e and should not be considered as final or recommended solutions.\n\n## 1. Project structure\n```\n|—— Resources\n|   |—— Common.resource               -- Resource file with common keywords\n|   |—— RobotFrameworkWeb.resource    -- Resource file with specific keywords for web app\n|—— Tests\n|   |—— Search.robot                  -- Example of a test case for the search functionality\n|—— Tools\n|   |—— 01_Listener.py                -- Resource containing a simple custom listener\n|   |—— 02_ResultVisitor.py           -- Script for modifying output.xml with a simple Result Visitor\n|   |—— 03_XMLParser.py               -- Script for modifying output.xml with a third-party library\n```\n\n## 2. Installation\n\nYou can install the required dependencies into your Python by running the following commands from the repository root folder:\n\n```bash\npython -m venv .venv\n\n.\\.venv\\Scripts\\activate\n\npip install -r requirements.txt\n\nrfbrowser init\n```\n\nAfter the inicialization of `rfbrowser` is done, you should be set to run the examples.\n\n## 3. Running the examples\n\nYou can run the flattening examples in any order by running the following commands from the repository root folder.\n\n\u003e [!NOTE]\n\u003e Examples may contain additional commands with rebot for the purpose of generating\n\u003e a new `log.html` where the results of the flattening can be easily observed.\n\n### 3.1 Listener\n\n```bash\nrobot -d Results --listener .\\Tools\\01_Listener.py Tests\n\nrebot -d Results -o flattened_output.xml --flattenkeywords tag:robot:flatten Results\\output.xml\n```\n\nWe will end up with a new `log.html` file where the keywords from the second level and further are hidden.\n\n### 3.2 Result Visitor\n\n```bash\nrobot -d Results Tests\n\npython .\\Tools\\02_ResultVisitor.py\n\nrebot -d Results Results\\flattened_output.xml\n```\n\nWe will end up with a new `log.html` file where the keywords from the second level and further are hidden.\n\n### 3.3 XML Parser\n\n```bash\nrobot -d Results Tests\n\npython .\\Tools\\03_XMLParser.py\n\nrebot -d Results Results\\flattened_output.xml\n```\n\nWe will end up with a new `log.html` file where the keywords from the second level and further are hidden.\n\n### 4. Contributions\n\nYou are welcomed to try your own experiments with the Robot Framework API in this project :-) If you have any suggestions for improvements or other ideas on how to dynamically flatten the top level keywords, feel free to share them via discussions, issues and so on.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felirianne%2Frobocon25-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felirianne%2Frobocon25-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felirianne%2Frobocon25-examples/lists"}