示例#1
0
 public void RestaurantFormAddMealTest()
 {
     Robot.SetForm(RESTAURANT_SIDE_FORM_TEXT);
     Robot.ClickButton("ButtonAddNewMeal");
     Robot.SetEdit("TextBoxMealName", "新增餐點");
     Robot.SetEdit("TextBoxMealPrice", "70");
     Robot.SetEdit("ComboBoxCategory", "飲料");
     Robot.ClickButton("ButtonBrowse");
     Robot.SelectFileByOpenFileDialog(OPEN_FILE_TITLE, OPEN_FILE_PATH.Trim('/').Split('/'));
     Robot.SetEdit(TEXT_BOX_MEAL_DESCRIPTION, TEXT_BOX_MEAL_DESCRIPTION_VALUE);
     Robot.ClickButton("ButtonSaveMeal");
     Robot.ClickListViewByValue(LIST_BOX_MEALS, "新增餐點");
     Robot.AssertEdit(TEXT_BOX_MEAL_NAME, "新增餐點");
     Robot.AssertEdit(TEXT_BOX_MEAL_PRICE, "70");
     Robot.AssertEdit("ComboBoxCategory", "飲料");
     Robot.AssertEdit("TextBoxPath", "/Resources/Assets/Sushi/4.jpg");
 }