getState()

if (getState().equals("待處理")){

getButton("button1").doClick();

}