package Ġde . sc and io . e 4 . test packages . li vel y blogs Ċ Ċ import Ġde . sc and io . e 4 . clients . web . Web Con fluence Ċ import Ġde . sc and io . e 4 . worker . interfaces . Web Client Ċ import Ġde . sc and io . e 4 . worker . util . Random Data Ċ import Ġorg . apache . commons . io . FileUtils Ċ import Ġjava . io . File Ċ import Ġjava . util .* Ċ Ċ class ĠL ively B logs Sel enium Helper ( ĊĠĠĠĠĠĠĠ Ġprotected Ġval Ġweb Client : ĠWeb Client Ċ ) Ġ{ ĊĊĠĠĠ Ġval Ġweb Con fluence Ġ= Ġweb Client Ġas ĠWeb Con fluence ĊĠĠĠ Ġval Ġdom Ġ= Ġweb Con fluence . dom ĊĊĠĠĠ Ġfun Ġset Te aser Image () Ġ{ ĊĠĠĠĠĠĠĠ Ġdom . click (". li vel y - blog - set - te aser ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġsetup Feature d Space ( space Key : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġweb Con fluence . navigate To (" admin / plugins / li vel y / blog / edit settings . action ") ĊĠĠĠĠĠĠĠ Ġdom . insert Text ("# spaces ", Ġspace Key , Ġtrue ) ĊĠĠĠĠĠĠĠ Ġdom . click ("# confirm ") ĊĠĠĠĠĠĠĠ Ġdom . await Element Present (" span # spaces ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġgo To Blog Overview () Ġ{ ĊĠĠĠĠĠĠĠ Ġweb Con fluence . navigate To (" plugins / li vel y / blog / all . action ") ĊĠĠĠĠĠĠĠ Ġdom . await Element Present (". li vel y - blog - filter ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġadd L ively Blog Category Return Id ( category Name : ĠString ): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġweb Con fluence . navigate To (" admin / plugins / li vel y / blog / categories . action ") ĊĠĠĠĠĠĠĠ Ġdom . insert Text ("# categories - table Ġinput [ name =' name '] ", Ġcategory Name ) ĊĠĠĠĠĠĠĠ Ġdom . insert Text ("# categories - table Ġinput [ name =' labels '] ", Ġcategory Name ) ĊĠĠĠĠĠĠĠ Ġdom . click (". a ui - rest f ult able - operations Ġinput [ type =' submit '] ") ĊĠĠĠĠĠĠĠ Ġval Ġtable Row Selector Ġ= Ġ". a ui - rest f ult able - row [ data - name ='$ category Name '] " ĊĠĠĠĠĠĠĠ Ġdom . await Element Present ( table Row Selector ) ĊĠĠĠĠĠĠĠ Ġreturn ĠInteger . parseInt ( dom . findElement ( table Row Selector ). getAttribute (" data - id ")) ĊĠĠĠ Ġ} Ċ Ċ }