From 2cf91fdbe9e597acccc9dcef4d0cc2705b7bad5b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 17 Aug 2026 17:40:12 +0000 Subject: [PATCH 1/3] Add price selection coverage Extends the wizard flow past product data into price selection: waits for the asynchronously-loaded price plans (the step whose reliability was previously unconfirmed), selects a plan via the same styled-radio sibling-click pattern used for gender, and submits via the same JS-dispatched click pattern already used for the other "next" buttons. Verification of this specific step against the live app is pending - its price-plan load was the one thing observed to be unreliable during the original investigation, before the WebDriver click fix. This commit is unverified against CI until pushed. --- resources/pages/price_option_page.resource | 49 ++++++++++++++++++++++ tests/car_insurance_quote.robot | 24 +++++++---- 2 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 resources/pages/price_option_page.resource diff --git a/resources/pages/price_option_page.resource b/resources/pages/price_option_page.resource new file mode 100644 index 0000000..aeb2c92 --- /dev/null +++ b/resources/pages/price_option_page.resource @@ -0,0 +1,49 @@ +*** Settings *** +Documentation Locators and keywords for the "Select Price Option" step of the +... insurance quote wizard. +... +... Like the gender radios on the insurant data step, the price plan +... radios are hidden behind styled spans (idealforms), so they're +... selected by clicking the visible sibling span, not the input. + +Library SeleniumLibrary +Resource ../common.resource + + +*** Variables *** +${SILVER_OPTION} css:#selectsilver + span.ideal-radio +${GOLD_OPTION} css:#selectgold + span.ideal-radio +${PLATINUM_OPTION} css:#selectplatinum + span.ideal-radio +${ULTIMATE_OPTION} css:#selectultimate + span.ideal-radio +${SEND_QUOTE_FIRST_FIELD} css:#email + + +*** Keywords *** +Select Price Option + [Documentation] Waits for the price plans to finish loading, selects one and + ... submits the step. Valid values: silver, gold, platinum, ultimate. + ... The price plans are fetched asynchronously after the product + ... data step, so this allows a generous timeout for that to settle. + [Arguments] ${plan} + VAR &{options} + ... silver=${SILVER_OPTION} + ... gold=${GOLD_OPTION} + ... platinum=${PLATINUM_OPTION} + ... ultimate=${ULTIMATE_OPTION} + Wait Until Element Is Visible ${options}[${plan}] timeout=45s + Wait Until Keyword Succeeds 10x 300ms Click Element ${options}[${plan}] + No Validation Errors Should Be Visible + Click Next Button + +Click Next Button + [Documentation] Submits the step. A plain WebDriver click on the equivalent + ... button in an earlier step was observed to intermittently and + ... repeatedly fail with ElementNotInteractableException in CI even + ... after several retries, so it's dispatched via JavaScript instead, + ... which the button's own click handler responds to just as well. + Execute Javascript document.getElementById('nextsendquote').click(); + +Price Option Should Be Accepted + [Documentation] Verifies the wizard genuinely moved on: the price plan selection + ... was accepted and the send-quote contact form has taken its place. + Wait Until Element Is Visible ${SEND_QUOTE_FIRST_FIELD} timeout=30s diff --git a/tests/car_insurance_quote.robot b/tests/car_insurance_quote.robot index f0ae79c..c70c880 100644 --- a/tests/car_insurance_quote.robot +++ b/tests/car_insurance_quote.robot @@ -1,32 +1,34 @@ *** Settings *** -Documentation Regression coverage for the vehicle, insurant and product data steps -... of the insurance quote wizard on the Tricentis sample insurance -... application. +Documentation Regression coverage for the vehicle, insurant, product data and price +... selection steps of the insurance quote wizard on the Tricentis sample +... insurance application. ... -... Price selection and quote submission are not covered here; see the -... "Known limitations" section of the project README. +... Quote submission (the contact/registration step after price +... selection) is not covered here; see the "Known limitations" section +... of the project README. Resource ../resources/common.resource Resource ../resources/pages/home_page.resource Resource ../resources/pages/vehicle_data_page.resource Resource ../resources/pages/insurant_data_page.resource Resource ../resources/pages/product_data_page.resource +Resource ../resources/pages/price_option_page.resource Resource ../resources/data/car_insurance_test_data.resource Suite Setup Open Insurance Application Suite Teardown Close Insurance Application Test Setup Go To Homepage Test Teardown Capture Screenshot On Failure -Test Timeout 1 minute +Test Timeout 2 minutes Test Tags car-insurance *** Test Cases *** Create Quote For Car With Valid Data - [Documentation] A customer can complete the vehicle, insurant and product data - ... steps of a car insurance quote with a valid profile, and each - ... step's data is genuinely accepted by the wizard. + [Documentation] A customer can complete the vehicle, insurant, product data and + ... price selection steps of a car insurance quote with a valid + ... profile, and each step's data is genuinely accepted by the wizard. [Tags] smoke Select Automobile Insurance Enter Vehicle Data &{VEHICLE_MERCEDES_BENZ} @@ -35,6 +37,8 @@ Create Quote For Car With Valid Data Insurant Data Should Be Accepted Enter Product Data Product Data Should Be Accepted + Select Price Option silver + Price Option Should Be Accepted Create Quote For Car With Multiple Vehicle Profiles [Documentation] The quote wizard accepts a range of valid vehicle configurations. @@ -58,3 +62,5 @@ Request Car Quote For Vehicle Insurant Data Should Be Accepted Enter Product Data Product Data Should Be Accepted + Select Price Option silver + Price Option Should Be Accepted From 1f2bc4acd2e14225a2e84f3883ae2188c704fcfd Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 17 Aug 2026 17:42:26 +0000 Subject: [PATCH 2/3] temp: check whether price-plan XHR fires at all --- .github/workflows/tests.yml | 2 +- tests/_diagnostic.robot | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 tests/_diagnostic.robot diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4eddefb..f3f0001 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,7 +26,7 @@ jobs: --outputdir results/ui --variable BROWSER:headlesschrome --include smoke - tests/car_insurance_quote.robot tests/insurance_navigation.robot + tests/_diagnostic.robot - name: Upload UI test results if: always() diff --git a/tests/_diagnostic.robot b/tests/_diagnostic.robot new file mode 100644 index 0000000..2889288 --- /dev/null +++ b/tests/_diagnostic.robot @@ -0,0 +1,32 @@ +*** Settings *** +Documentation Temporary diagnostic: checks whether the price-plan step actually +... fires a data-fetching request this time. Not part of the portfolio. +Resource ../resources/common.resource +Resource ../resources/pages/home_page.resource +Resource ../resources/pages/vehicle_data_page.resource +Resource ../resources/pages/insurant_data_page.resource +Resource ../resources/pages/product_data_page.resource +Resource ../resources/data/car_insurance_test_data.resource +Suite Setup Open Insurance Application +Suite Teardown Close Insurance Application +Test Tags smoke + + +*** Test Cases *** +Check Price Plan Load + Select Automobile Insurance + Enter Vehicle Data &{VEHICLE_MERCEDES_BENZ} + Vehicle Data Should Be Accepted + Enter Insurant Data &{INSURANT_JANE_DOE} + Insurant Data Should Be Accepted + Enter Product Data + Product Data Should Be Accepted + Sleep 10s + ${state}= Execute Javascript + ... var xhrs = performance.getEntriesByType('resource').filter(function(r) { return r.initiatorType === 'xmlhttprequest' || r.initiatorType === 'fetch'; }).map(function(r) { return r.name + ' dur=' + Math.round(r.duration) + ' start=' + Math.round(r.startTime); }).join(' || '); + ... var loader = document.getElementById('xLoaderPrice'); + ... var loaderVis = loader ? (loader.offsetParent !== null) : 'MISSING'; + ... var silver = document.getElementById('selectsilver'); + ... var silverVis = silver ? (silver.offsetParent !== null) : 'MISSING'; + ... return 'loaderVisible=' + loaderVis + ' silverVisible=' + silverVis + ' XHRS: ' + xhrs; + Log PRICE STATE: ${state} console=True From 6a8502fb91909d25d4ffc5022278d1bb6682e18f Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 17 Aug 2026 17:48:34 +0000 Subject: [PATCH 3/3] Revert price selection coverage: confirmed unreliable, not a code issue Direct evidence from CI: after submitting product data and clicking next, the price-plan loading spinner appears but no price-fetching XHR/fetch request is ever made (Performance API captured zero requests after a 10s wait). This isn't a slow response or a timing issue that a longer wait could fix - the live application's price computation step simply never gets triggered under headless Chrome automation in CI. This confirms the concern already noted in the README's "Known limitations" section before this was attempted: the price-plan step's reliability under automation is a live-app issue, not something in this test suite's control. Reverting to the last known-good state (ending coverage at product data acceptance) rather than shipping a step that fails unpredictably. --- .github/workflows/tests.yml | 2 +- resources/pages/price_option_page.resource | 49 ---------------------- tests/_diagnostic.robot | 32 -------------- tests/car_insurance_quote.robot | 24 ++++------- 4 files changed, 10 insertions(+), 97 deletions(-) delete mode 100644 resources/pages/price_option_page.resource delete mode 100644 tests/_diagnostic.robot diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f3f0001..4eddefb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,7 +26,7 @@ jobs: --outputdir results/ui --variable BROWSER:headlesschrome --include smoke - tests/_diagnostic.robot + tests/car_insurance_quote.robot tests/insurance_navigation.robot - name: Upload UI test results if: always() diff --git a/resources/pages/price_option_page.resource b/resources/pages/price_option_page.resource deleted file mode 100644 index aeb2c92..0000000 --- a/resources/pages/price_option_page.resource +++ /dev/null @@ -1,49 +0,0 @@ -*** Settings *** -Documentation Locators and keywords for the "Select Price Option" step of the -... insurance quote wizard. -... -... Like the gender radios on the insurant data step, the price plan -... radios are hidden behind styled spans (idealforms), so they're -... selected by clicking the visible sibling span, not the input. - -Library SeleniumLibrary -Resource ../common.resource - - -*** Variables *** -${SILVER_OPTION} css:#selectsilver + span.ideal-radio -${GOLD_OPTION} css:#selectgold + span.ideal-radio -${PLATINUM_OPTION} css:#selectplatinum + span.ideal-radio -${ULTIMATE_OPTION} css:#selectultimate + span.ideal-radio -${SEND_QUOTE_FIRST_FIELD} css:#email - - -*** Keywords *** -Select Price Option - [Documentation] Waits for the price plans to finish loading, selects one and - ... submits the step. Valid values: silver, gold, platinum, ultimate. - ... The price plans are fetched asynchronously after the product - ... data step, so this allows a generous timeout for that to settle. - [Arguments] ${plan} - VAR &{options} - ... silver=${SILVER_OPTION} - ... gold=${GOLD_OPTION} - ... platinum=${PLATINUM_OPTION} - ... ultimate=${ULTIMATE_OPTION} - Wait Until Element Is Visible ${options}[${plan}] timeout=45s - Wait Until Keyword Succeeds 10x 300ms Click Element ${options}[${plan}] - No Validation Errors Should Be Visible - Click Next Button - -Click Next Button - [Documentation] Submits the step. A plain WebDriver click on the equivalent - ... button in an earlier step was observed to intermittently and - ... repeatedly fail with ElementNotInteractableException in CI even - ... after several retries, so it's dispatched via JavaScript instead, - ... which the button's own click handler responds to just as well. - Execute Javascript document.getElementById('nextsendquote').click(); - -Price Option Should Be Accepted - [Documentation] Verifies the wizard genuinely moved on: the price plan selection - ... was accepted and the send-quote contact form has taken its place. - Wait Until Element Is Visible ${SEND_QUOTE_FIRST_FIELD} timeout=30s diff --git a/tests/_diagnostic.robot b/tests/_diagnostic.robot deleted file mode 100644 index 2889288..0000000 --- a/tests/_diagnostic.robot +++ /dev/null @@ -1,32 +0,0 @@ -*** Settings *** -Documentation Temporary diagnostic: checks whether the price-plan step actually -... fires a data-fetching request this time. Not part of the portfolio. -Resource ../resources/common.resource -Resource ../resources/pages/home_page.resource -Resource ../resources/pages/vehicle_data_page.resource -Resource ../resources/pages/insurant_data_page.resource -Resource ../resources/pages/product_data_page.resource -Resource ../resources/data/car_insurance_test_data.resource -Suite Setup Open Insurance Application -Suite Teardown Close Insurance Application -Test Tags smoke - - -*** Test Cases *** -Check Price Plan Load - Select Automobile Insurance - Enter Vehicle Data &{VEHICLE_MERCEDES_BENZ} - Vehicle Data Should Be Accepted - Enter Insurant Data &{INSURANT_JANE_DOE} - Insurant Data Should Be Accepted - Enter Product Data - Product Data Should Be Accepted - Sleep 10s - ${state}= Execute Javascript - ... var xhrs = performance.getEntriesByType('resource').filter(function(r) { return r.initiatorType === 'xmlhttprequest' || r.initiatorType === 'fetch'; }).map(function(r) { return r.name + ' dur=' + Math.round(r.duration) + ' start=' + Math.round(r.startTime); }).join(' || '); - ... var loader = document.getElementById('xLoaderPrice'); - ... var loaderVis = loader ? (loader.offsetParent !== null) : 'MISSING'; - ... var silver = document.getElementById('selectsilver'); - ... var silverVis = silver ? (silver.offsetParent !== null) : 'MISSING'; - ... return 'loaderVisible=' + loaderVis + ' silverVisible=' + silverVis + ' XHRS: ' + xhrs; - Log PRICE STATE: ${state} console=True diff --git a/tests/car_insurance_quote.robot b/tests/car_insurance_quote.robot index c70c880..f0ae79c 100644 --- a/tests/car_insurance_quote.robot +++ b/tests/car_insurance_quote.robot @@ -1,34 +1,32 @@ *** Settings *** -Documentation Regression coverage for the vehicle, insurant, product data and price -... selection steps of the insurance quote wizard on the Tricentis sample -... insurance application. +Documentation Regression coverage for the vehicle, insurant and product data steps +... of the insurance quote wizard on the Tricentis sample insurance +... application. ... -... Quote submission (the contact/registration step after price -... selection) is not covered here; see the "Known limitations" section -... of the project README. +... Price selection and quote submission are not covered here; see the +... "Known limitations" section of the project README. Resource ../resources/common.resource Resource ../resources/pages/home_page.resource Resource ../resources/pages/vehicle_data_page.resource Resource ../resources/pages/insurant_data_page.resource Resource ../resources/pages/product_data_page.resource -Resource ../resources/pages/price_option_page.resource Resource ../resources/data/car_insurance_test_data.resource Suite Setup Open Insurance Application Suite Teardown Close Insurance Application Test Setup Go To Homepage Test Teardown Capture Screenshot On Failure -Test Timeout 2 minutes +Test Timeout 1 minute Test Tags car-insurance *** Test Cases *** Create Quote For Car With Valid Data - [Documentation] A customer can complete the vehicle, insurant, product data and - ... price selection steps of a car insurance quote with a valid - ... profile, and each step's data is genuinely accepted by the wizard. + [Documentation] A customer can complete the vehicle, insurant and product data + ... steps of a car insurance quote with a valid profile, and each + ... step's data is genuinely accepted by the wizard. [Tags] smoke Select Automobile Insurance Enter Vehicle Data &{VEHICLE_MERCEDES_BENZ} @@ -37,8 +35,6 @@ Create Quote For Car With Valid Data Insurant Data Should Be Accepted Enter Product Data Product Data Should Be Accepted - Select Price Option silver - Price Option Should Be Accepted Create Quote For Car With Multiple Vehicle Profiles [Documentation] The quote wizard accepts a range of valid vehicle configurations. @@ -62,5 +58,3 @@ Request Car Quote For Vehicle Insurant Data Should Be Accepted Enter Product Data Product Data Should Be Accepted - Select Price Option silver - Price Option Should Be Accepted