package Ġcom . av ito . android . ui . test . dialog Ċ Ċ import Ġandroidx . test . espress o . matcher . View Matchers Ċ import Ġcom . av ito . android . screen . Screen Checks Ċ import Ġcom . av ito . android . test . page _ object . Dialog Screen Ċ import Ġcom . av ito . android . test . page _ object . Popup Screen Ċ import Ġcom . av ito . android . test . page _ object . Simple Screen Ċ import Ġcom . av ito . android . test . page _ object . View Element Ċ import Ġcom . av ito . android . ui . R Ċ Ċ class ĠDialog s Screen Ġ: ĠSimple Screen () Ġ{ ĊĊĠĠĠ Ġoverride Ġval Ġroot Id : ĠInt Ġ= ĠR . id . content ĊĊĠĠĠ Ġval Ġlabel : ĠView Element Ġ= Ġelement ( View Matchers . with Id ( R . id . label )) ĊĊĠĠĠ Ġval Ġpopup Ġ= ĠPopup () ĊĊĠĠĠ Ġoverride Ġval Ġchecks : ĠScreen Checks Ġ= ĊĠĠĠĠĠĠĠ ĠSimple Screen Checks ( screen Ġ= Ġthis , Ġcheck On Each Screen Interaction Ġ= Ġtrue ) ĊĊĠĠĠ Ġclass ĠPopup Ġ: ĠPopup Screen ( ĊĠĠĠĠĠĠĠ Ġmatcher Ġ= ĠView Matchers . with Id ( R . id . popup _ content ) ĊĠĠĠ Ġ) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġval Ġlabel : ĠView Element Ġ= Ġelement ( View Matchers . with Id ( R . id . label )) ĊĠĠĠ Ġ} Ċ } Ċ Ċ class ĠDialog Screen With Dialog Root Ġ: ĠDialog Screen ( ĊĠĠĠ ĠView Matchers . with Id ( R . id . content ) Ċ ) Ġ{ ĊĠĠĠ Ġval Ġlabel : ĠView Element Ġ= Ġelement ( View Matchers . with Id ( R . id . label )) Ċ } Ċ Ċ class ĠDialog Screen With Popup Root Ġ: ĠPopup Screen ( ĊĠĠĠ ĠView Matchers . with Id ( R . id . content ) Ċ ) Ġ{ ĊĠĠĠ Ġval Ġlabel : ĠView Element Ġ= Ġelement ( View Matchers . with Id ( R . id . label )) Ċ } Ċ