package Ġcom . may ok un ad eni yi . instant weather . kas press o . extensions Ċ Ċ import Ġandroidx . test . espress o . action . Coordinates Provider Ċ import Ġcom . ag oda . k ak ao . common . actions . Base Actions Ċ import Ġcom . kas per sky . kas press o . test cases . core . test context . TestContext Ċ import Ġcom . may ok un ad eni yi . instant weather . kas press o . EXPECTED Ċ import Ġcom . may ok un ad eni yi . instant weather . kas press o . SCREEN SHOT _ CONTENT Ċ import Ġcom . may ok un ad eni yi . instant weather . kas press o . SCREEN SHOT _ EXPECTED Ċ import Ġcom . may ok un ad eni yi . instant weather . kas press o . Screenshots F alcon Ċ import Ġcom . may ok un ad eni yi . instant weather . utils . Esp ress o Actions Ċ import Ġcom . may ok un ad eni yi . instant weather . utils . Visible Center Global Coordinates Provider Ċ import Ġjava . lang . IllegalArgumentException Ċ Ċ fun ĠTest Context <* >. expected ( description : ĠString , Ġactions : Ġ(() Ġ-> ĠUnit )? Ġ= Ġnull ) Ġ{ ĊĠĠĠ Ġif Ġ( description . isBlank ()) Ġ{ ĊĠĠĠĠĠĠĠ Ġthrow ĠIllegalArgumentException (" description ĠÐ½Ðµ ĠÐ´Ð¾Ð»Ð¶ Ð½Ñĭ ĠÐ±ÑĭÑĤÑĮ ĠÐ¿ ÑĥÑģÑĤ Ñĭ Ð¼ ") ĊĠĠĠ Ġ} ĊĠĠĠ Ġdescription . lines (). forEach Ġ{ Ġline Ġ-> ĊĠĠĠĠĠĠĠ Ġtest Logger . i ("$ EXPECTED Ġ$ line ") ĊĠĠĠ Ġ} ĊĠĠĠ Ġactions ?. apply Ġ{ ĊĠĠĠĠĠĠĠ Ġtry Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinvoke () ĊĠĠĠĠĠĠĠ Ġ} Ġfinally Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtake Screenshot ( SCREEN SHOT _ EXPECTED ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ Ċ private Ġfun ĠTest Context <* >. take Screenshot ( name : ĠString ) Ġ{ ĊĠĠĠ Ġval Ġtag Ġ= ĠSystem . currentTimeMillis (). toString () ĊĠĠĠ Ġtest Logger . i ("$ name Ġ$ tag ") ĊĠĠĠ Ġval Ġfile Ġ= Ġ( device . screenshots Ġas ĠScreenshots F alcon ). get Screenshot File ( tag ) ĊĠĠĠ Ġdevice . ui Device . take Screenshot ( file ) Ċ } Ċ Ċ fun ĠTest Context <* >. take Screenshot () Ġ{ ĊĠĠĠ Ġtake Screenshot ( SCREEN SHOT _ CONTENT ) Ċ } Ċ Ċ fun ĠBase Actions . in Process Click ( coordinates Provider : ĠCoordinates Provider Ġ= ĠVis ible Center Global Coordinates Provider ()) Ġ{ ĊĠĠĠ Ġact Ġ{ ĠE sp ress o Actions . click ( coordinates Provider Ġ= Ġcoordinates Provider ) Ġ} Ċ }