from ldtp import *
hasstate ('*-gedit', 'txt0', state.FOCUSABLE)
hasstate ('*-gedit', 'txt0', state.FOCUSABLE + state.VISIBLE)