package Ġio . ro is ag iv . github . weight tracker . e 2 e . robot Ċ Ċ import Ġandroidx . test . espress o . Esp ress o . close Soft Keyboard Ċ import Ġandroidx . test . espress o . Esp ress o . on View Ċ import Ġandroidx . test . espress o . action . View Actions . click Ċ import Ġandroidx . test . espress o . action . View Actions . type Text Ċ import Ġandroidx . test . espress o . matcher . View Matchers . with Content Description Ċ import Ġandroidx . test . uia utom ator . Ui Device Ċ import Ġandroidx . test . uia utom ator . Ui Selector Ċ import Ġcom . sch ib st ed . sp ain . bar ista . assertion . Bar ista Visibility Assertions . assert Displayed Ċ import Ġio . ro is ag iv . github . weight tracker . R Ċ Ċ class ĠAdd Weight Robot ( private Ġval Ġui Device : ĠUi Device ) Ġ{ ĊĊĠĠĠ Ġfun Ġassert Page Displayed () Ġ{ ĊĠĠĠĠĠĠĠ Ġui Device . find Object ( Ui Selector (). text Contains (" SAVE ")) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. waitFor Exists ( 5 0 0 0 ) ĊĠĠĠĠĠĠĠ Ġassert Displayed (" SAVE ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġtype Weight ( weight : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Content Description ( R . string . content _ description _ weight )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( type Text ( weight )) ĊĠĠĠĠĠĠĠ Ġclose Soft Keyboard () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġsave () Ġ{ ĊĠĠĠĠĠĠĠ Ġon View ( with Content Description ( R . string . content _ description _ save _ button )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. perform ( click ()) ĊĠĠĠ Ġ} Ċ } Ċ