package Ġuk . gov . just ice . digital . h mp ps . pec s . j pc . integration . pages Ċ Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . fluent lenium . core . annotation . Page Url Ċ import Ġorg . openqa . selenium . By Ċ import Ġuk . gov . just ice . digital . h mp ps . pec s . j pc . domain . price . Money Ċ Ċ @ Page Url (" http :// localhost : 8 0 8 0 / jo urney s - results ? pick - up ={ from Ag ency }& drop - off ={ to Ag ency }") Ċ class ĠJo urney Results Page Ġ: ĠApplication Page () Ġ{ ĊĊĠ Ġfun Ġis At Results Page For Jo urney ( from Ag ency : ĠString , Ġto Ag ency : ĠString ): ĠJo urney Results Page Ġ{ ĊĠĠĠ Ġthis . is At ( from Ag ency . replace (" Ġ", Ġ"% 2 0 "), Ġto Ag ency . replace (" Ġ", Ġ"% 2 0 ")) ĊĊĠĠĠ Ġreturn Ġthis ĊĠ Ġ} ĊĊĠ Ġfun Ġnavigate ToUpdate Price For ( from Ag ency Id : ĠString , Ġto Ag ency Id : ĠString ) Ġ{ ĊĠĠĠ Ġval Ġelement Ġ= Ġthis . find ( By . xpath ("// a [@ href ='/ update - price /$ from Ag ency Id -$ to Ag ency Id '] ")). first OrNull () ĊĊĠĠĠ ĠassertThat ( element ). isNotNull ĊĊĠĠĠ Ġelement ?. click () ĊĠ Ġ} ĊĊĠ Ġfun Ġis Price Updated Message Present ( from Ag ency : ĠString , Ġto Ag ency : ĠString , Ġprice : ĠMoney ): ĠJo urney Results Page Ġ{ ĊĠĠĠ Ġassert Banner Is Present (" Price Ġupdated ", Ġ" Jo urney Ġfrom Ġ$ from Ag ency Ġto Ġ$ to Ag ency Ġpr iced Ġat ĠÂ £ $ price ") ĊĊĠĠĠ Ġreturn Ġthis ĊĠ Ġ} ĊĊĠ Ġfun Ġis Jo urney Row Present ( from Ag ency : ĠString , Ġto Ag ency : ĠString , Ġprice : ĠMoney ): ĠJo urney Results Page Ġ{ ĊĠĠĠ Ġval Ġrow Ġ= Ġthis . find ( By . xpath ("// tr [ contains (. ,' $ from Ag ency ') Ġand Ġcontains ( ., Ġ'$ to Ag ency ') Ġand Ġcontains ( ., Ġ' Â £ $ price ')] ")). first OrNull () ĊĊĠĠĠ ĠassertThat ( row ). isNotNull ĊĊĠĠĠ Ġreturn Ġthis ĊĠ Ġ} Ċ } Ċ