diff --git a/.github/workflows/Changelog.yml b/.github/workflows/Changelog.yml index 26a72a2..9de6c31 100644 --- a/.github/workflows/Changelog.yml +++ b/.github/workflows/Changelog.yml @@ -18,4 +18,4 @@ jobs: run: git fetch - name: Check that changelog has been updated. - run: git diff --exit-code origin/${{ github.base_ref }} -- changelog.md && exit 1 || exit 0 + run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 010c370..58da28c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.1] - 2025-02-07 + +### Fixed + +- Added check on whether the "Vis svar" button is actually shown ## [1.0.0] - 2024-10-03 - Initial release -[Unreleased]: https://github.com/itk-dev-rpa/eflyt-godkend-flyttedato/compare/1.0.0...HEAD +[1.0.1]: https://github.com/itk-dev-rpa/eflyt-godkend-flyttedato/releases/tag/1.0.1 [1.0.0]: https://github.com/itk-dev-rpa/eflyt-godkend-flyttedato/releases/tag/1.0.0 diff --git a/pyproject.toml b/pyproject.toml index dc31d09..b630272 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "robot_framework" -version = "1.0.0" +version = "1.0.1" authors = [ { name="ITK Development", email="itk-rpa@mkb.aarhus.dk" }, ] diff --git a/robot_framework/process.py b/robot_framework/process.py index d8f356a..e3e7815 100644 --- a/robot_framework/process.py +++ b/robot_framework/process.py @@ -65,7 +65,11 @@ def handle_case(browser: webdriver.Chrome) -> bool: Whether the case was approved or not """ registered_date = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_GridViewMovingPersons_ctl02_lnkDateCPR").text - browser.find_element(By.LINK_TEXT, "Vis svar").click() + vis_svar_element = browser.find_element(By.LINK_TEXT, "Vis svar") + if vis_svar_element: + vis_svar_element.click() + else: + return False response_date = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_moPersonTab_txtFradato").get_attribute("value") selection_table = browser.find_element(By.ID, "ctl00_ContentPlaceHolder2_ptFanePerson_moPersonTab_rdoEDSLogivartResponseType")