public void TC005_Menu_Button_Open_Menu_With_Correct_Content(string element, string expectedText) { if (stepMenuOptions.verify_menu_displayed() == true) { stepMenuOptions.click_back_android_button(); } // driver.FindElementById("com.accuweather.android:id/tool_bar").FindElement(By.ClassName("android.widget.ImageButton")).Click(); Assert.That(stepMenuOptions.click_menu_button_by_class(), Is.True, "Menu button is not found"); Assert.That(stepMenuOptions.verify_element_displayed_menu_by_id(element), Is.True, element + " is not displayed in the menu"); Assert.That(stepMenuOptions.get_element_text_menu_by_id(element), Is.EqualTo(expectedText), element + " is displayed with the incorrect text"); }
public void TC016_chagne_to_metrics_system() { if (stepMenuOptions.verify_menu_displayed() == true) { Assert.That(stepMenuOptions.touch_outside_element_by_id(), Is.True, "Problems to touch outside of the Menu");//close menu option } Assert.That(stepMenuOptions.click_more_options(), Is.True, "More options button is not found"); Assert.That(stepMenuOptions.click_settings_option(), Is.True, "Settings button is not found"); Assert.That(stepMenuOptions.click_units_option(), Is.True, "Units option is not found"); Assert.That(stepMenuOptions.click_metric_option(), Is.True, "Metric option is not found"); stepMenuOptions.click_back_android_button(); stepMenuOptions.click_back_android_button(); Assert.AreEqual(" KM/H", stepMenuOptions.get_units_text()); }
public void TC015_Edit_Location_Delete_Location_When_It_Is_Swipped_Left(string screen) { if (stepMenuOptions.verify_menu_displayed() == false) { Assert.That(stepMenuOptions.click_menu_button_by_class(), Is.True, "Menu Button is not found"); } int num_locations_added_in_menu = stepMenuOptions.get_amount_of_elements_location_list_by_id(); Assert.That(stepMenuOptions.click_edit_location_button_by_id(), Is.True, "Edit Location button is not found"); Assert.That(stepEditLocation.verify_element_displayed_edit_location_screen_by_id("editlist"), Is.True, "Location list is not displyaed"); int num_locations_added_in_edit = stepEditLocation.get_amount_of_elements_location_list_by_class(); Assert.That(num_locations_added_in_edit, Is.GreaterThan(1), "There is no enough locations to test a delete operation"); Assert.That(stepEditLocation.swipe_location_to_delete_by_class(num_locations_added_in_edit - 1), Is.True, "The element cannot be swipped"); if (screen.ToLower().Equals("Menu".ToLower())) { stepEditLocation.click_back_android_button(); Assert.That(num_locations_added_in_menu - 1, Is.EqualTo(stepMenuOptions.get_amount_of_elements_location_list_by_id()), "The element is not deleted in " + screen); } else if (screen.ToLower().Equals("Edit".ToLower())) { Assert.That(num_locations_added_in_edit - 1, Is.EqualTo(stepEditLocation.get_amount_of_elements_location_list_by_class()), "The element is not deleted in " + screen); } else { Assert.False(false, "The screen to verify that the element is deleted is not found"); } }
public void TC009_Add_Location_Back_button_Display_Previous_Screen() { if (stepMenuOptions.verify_menu_displayed() == false) { Assert.That(stepMenuOptions.click_menu_button_by_class(), Is.True, "Menu Button is not found"); } Assert.That(stepMenuOptions.click_add_location_button_by_id(), Is.True, "Add Location button is not found"); Assert.That(stepAddLocation.click_back_button_by_id, Is.True, "Back button is not found"); Assert.That(stepAddLocation.verify_add_location_screen_displayed, Is.False, "Add location screen is still displayed"); Assert.That(stepMenuOptions.verify_menu_displayed(), Is.True, "Previous screen is not displayed after touching Back button from Add Location screen"); }