def click_agency_feed_avl(driver, agency_feed_avl, index, ws_index):

    AppCommanUtility.click_widget_items(driver, agency_feed_avl, index, ws_index)

    click_avl_live_select_all_checkbox(driver, agency_feed_avl, index, ws_index)

    click_okbtn_avl_live_tab(driver, agency_feed_avl, index, ws_index)
def click_down_panel_div(driver, tool_name, index, ws_index):

    """ Method to click on down panel"""

    AppCommanUtility.click_down_panel(driver, tool_name, index, ws_index)
    click_select_layer_container(driver, tool_name, index, ws_index)
    click_right_panel_open(driver, tool_name, index, ws_index)
def click_okbtn_historic_select_by_unit_tab(driver, agency_feed_avl, index, ws_index):
    try:
        avl_ok_content = driver.find_elements_by_class_name("avlOkContent")
        avl_ok_content[1].click()
        time.sleep(2)
    except Exception:
        TestFailScreenShots.get_screenshots(driver, agency_feed_avl, "click_okbtn_historic_select_by_unit_tab")
        TestLog.log_creation(agency_feed_avl, "click_okbtn_historic_select_by_unit_tab", index, ws_index)
    try:
        avl_historic_layer = driver.find_element_by_id("avlHistoricLayer_layer")
        if avl_historic_layer.is_displayed():
            AppCommanUtility.click_minimize_btn(driver, agency_feed_avl, index, ws_index)

            AppCommanUtility.click_down_panel(driver, agency_feed_avl, index, ws_index)

            AppCommanUtility.click_select_layer_label_container(driver, agency_feed_avl, index, ws_index)

            AppCommanValidation.validate_layer_name(driver, "AVL Historic Layer", agency_feed_avl, index, ws_index, boolean_value=True)

            AppCommanValidation.validate_right_panel_layer_name(driver, "AVL Historic Layer", agency_feed_avl, index, ws_index)

            AppCommanValidation.validate_agency_feed_avl_historic_tab(driver, "avlHistoricLayer")

            AppCommanUtility.click_maximize_btn(driver, agency_feed_avl, index, ws_index)

    except Exception:
        AppCommanUtility.click_popup_close_icon(driver, agency_feed_avl)
    def test_serach_attribute_tool(self, index, result, tools_advanced_search_search_attribute_item, search_attribute_textbox_search_layer_text, search_attribute_textbox_Field_text, search_attribute_textbox_Operaror_text, search_attribute_textbox_Value_text, query_name, search_attribute_tool_name, search_attribute_sub_layer_name):

        """ Test Method """

        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver, tools_advanced_search_search_attribute_item, int(index), ws_index=2, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsToolSearchAttribute.click_widget_icon(self.driver, tools_advanced_search_search_attribute_item, int(index), ws_index=2)

        # click advanced search item search attribute
        SeleniumActionsToolSearchAttribute.click_advanced_search_item_search_attribute(self.driver, tools_advanced_search_search_attribute_item, int(index), ws_index=2)

        # fill data search attribute new query
        SeleniumActionsToolSearchAttribute.fill_data_search_attribute_new_query(self.driver, search_attribute_textbox_search_layer_text, search_attribute_textbox_Field_text, search_attribute_textbox_Operaror_text, search_attribute_textbox_Value_text, query_name, search_attribute_tool_name, search_attribute_sub_layer_name, tools_advanced_search_search_attribute_item, index, ws_index=2)

        # click right sub panel prior query
        SeleniumActionsToolSearchAttribute.click_right_sub_panel_prior_query(self.driver, tools_advanced_search_search_attribute_item, index, ws_index=2)

        # fill data search attribute prior query
        SeleniumActionsToolSearchAttribute.fill_data_search_attribute_prior_query(self.driver, query_name, search_attribute_tool_name, index, ws_index=2)

        # search attribute tool validation
        SeleniumActionsToolSearchAttribute.app_validation(self.driver, search_attribute_tool_name, search_attribute_textbox_search_layer_text, search_attribute_sub_layer_name, index, ws_index=2)
def click_browse_container(driver, browse_tab_container_name, category_main_layer_name, category_sub_layer_name, tool_name, index, ws_index):

    """ Method to click on container of browse widget"""

    AppCommanUtility.click_browse_tab_item(driver, browse_tab_container_name, tool_name, index, ws_index)

    select_layer_browse_widget(driver, category_main_layer_name, category_sub_layer_name, tool_name, index, ws_index)
def validate_social_media_youtube(driver, social_media_youtube, youtube_layer_name, index, ws_index):

    """ Method to validate the twitter social media item """
    try:
        row_tweet_container = driver.find_elements_by_class_name("rowYoutubeContainer")
        row_tweet_container[0].click()
    except Exception:
        AppCommanUtility.widget_close_icon(driver, social_media_youtube, index, ws_index)
        TestResults.open_py_excel_pass(index, ws_index)
        return True

    AppCommanUtility.click_minimize_btn(driver, social_media_youtube, index, ws_index)

    YouTubeValidation.validate_youtube_highlighted_buffer(driver)

    AppCommanUtility.widget_close_icon(driver, social_media_youtube, index, ws_index)

    YouTubeValidation.validate_youtube_buffer(driver)

    AppCommanUtility.click_down_panel(driver, social_media_youtube, index, ws_index)

    AppCommanUtility.click_select_layer_label_container(driver, social_media_youtube, index, ws_index)

    AppCommanValidation.validate_layer_name(driver, youtube_layer_name, social_media_youtube, index, ws_index, boolean_value=True)

    AppCommanValidation.validate_right_panel_layer_name(driver, youtube_layer_name, social_media_youtube, index, ws_index)

    AppCommanValidation.validate_feature_count_panel(driver, social_media_youtube, index, ws_index)

    AppCommanValidation.validate_feature_count(driver, "youtubeResultFeatureLayer", social_media_youtube, index, ws_index)

    TestResults.open_py_excel_pass(index, ws_index)
Beispiel #7
0
def click_advanced_search_item_search_attribute(
        driver, advanced_search_item_search_attribute, index, ws_index):
    """ Method to perform click action on search attribute tool  """

    AppCommanUtility.click_widget_items(driver,
                                        advanced_search_item_search_attribute,
                                        index, ws_index)
def tool_bomb_blast_validation(driver, index, tool_bomb_blast_widget_name,
                               tools_utilities_bomb_blast_item, ws_index):
    """ Method to perform validation of tool bomb blast """

    AppCommanUtility.click_down_panel(driver, tools_utilities_bomb_blast_item,
                                      index, ws_index)
    AppCommanUtility.click_select_layer_label_container(
        driver, tools_utilities_bomb_blast_item, index, ws_index)
    AppCommanUtility.click_right_panel_open(driver,
                                            tools_utilities_bomb_blast_item,
                                            index,
                                            boolean_value=False,
                                            ws_index=7)
    AppCommanUtility.click_graphics_tab(driver,
                                        tools_utilities_bomb_blast_item, index,
                                        ws_index)
    AppCommanValidation.validate_right_panel_layer_name(
        driver, tool_bomb_blast_widget_name, tools_utilities_bomb_blast_item,
        index, ws_index)
    AppCommanUtility.click_bottom_panel_layer(driver,
                                              tool_bomb_blast_widget_name,
                                              tools_utilities_bomb_blast_item,
                                              index, ws_index)
    AppCommanValidation.validate_feature_count_panel(
        driver, tools_utilities_bomb_blast_item, index, ws_index)
    AppCommanValidation.validate_feature_count(
        driver, tool_bomb_blast_widget_name, tools_utilities_bomb_blast_item,
        index, ws_index)
    TestLogBombBlast.open_py_excel_pass(index, ws_index)
def find_coordinates_tool_validation(driver,
                                     tools_navigation_find_coordinates_item,
                                     index, ws_index):
    """ Method to validate the tool find coordinates """

    AppCommanUtility.click_down_panel(driver,
                                      tools_navigation_find_coordinates_item,
                                      index, ws_index)
    AppCommanUtility.click_select_layer_label_container(
        driver, tools_navigation_find_coordinates_item, index, ws_index)
    AppCommanUtility.click_right_panel_open(
        driver, False, tools_navigation_find_coordinates_item, index, ws_index)
    AppCommanUtility.click_graphics_tab(
        driver, tools_navigation_find_coordinates_item, index, ws_index)
    AppCommanValidation.validate_right_panel_layer_name(
        driver, tools_navigation_find_coordinates_item,
        tools_navigation_find_coordinates_item, index, ws_index)

    AppCommanUtility.click_bottom_panel_layer(
        driver, tools_navigation_find_coordinates_item,
        tools_navigation_find_coordinates_item, index, ws_index)
    AppCommanValidation.validate_feature_count_panel(
        driver, tools_navigation_find_coordinates_item, index, ws_index)
    AppCommanValidation.validate_feature_circle_count(
        driver, "findCoordinates", tools_navigation_find_coordinates_item,
        index, ws_index)

    TestResults.open_py_excel_pass(index, ws_index)
    def test_search_coordinate_tool(self, index, result, tools_utilities_selection_item, main_layer_name, sub_layer_name, tool_selection_textbox_distance_text):

        """ Test Method """
        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver, tools_utilities_selection_item, int(index), ws_index=6, method_name="click_left_panel_open")

        # select browse tab
        SeleniumActionTestToolSelection.select_browse_tab_layer(self.driver, main_layer_name, sub_layer_name, tools_utilities_selection_item, int(index), ws_index=6)

        # click widget icon
        SeleniumActionTestToolSelection.click_widget_icon(self.driver, tools_utilities_selection_item, int(index), ws_index=6)

        # click utilities item selection
        SeleniumActionTestToolSelection.click_utilities_item_selection(self.driver, tools_utilities_selection_item, sub_layer_name, int(tool_selection_textbox_distance_text), int(index), ws_index=6)

        # tool selection buffer tab validation
        SeleniumActionTestToolSelection.tool_selection_buffer_validation(self.driver, tools_utilities_selection_item, int(index), ws_index=6)

        # click utilities item proximity
        SeleniumActionTestToolSelection.click_utilities_item_selection_proximity(self.driver, tools_utilities_selection_item, sub_layer_name, int(tool_selection_textbox_distance_text), int(index), ws_index=6)

        # tool selection proximity tab validation
        SeleniumActionTestToolSelection.tool_selection_proximity_validation(self.driver, tools_utilities_selection_item, int(index), ws_index=6)
Beispiel #11
0
def click_lpr_select_by_lpn_okbtn(driver, agency_feed_lpr, index, ws_index):

    lpr_Ok_Content = driver.find_elements_by_class_name("lprOkContent")
    lpr_Ok_Content[1].click()
    time.sleep(2)

    avl_historic_layer = driver.find_element_by_id("historicLayer_layer")
    if avl_historic_layer.is_displayed():
        AppCommanUtility.click_minimize_btn(driver, "LPR", index, ws_index)

        AppCommanUtility.click_down_panel(driver, agency_feed_lpr, index,
                                          ws_index)

        AppCommanUtility.click_select_layer_label_container(
            driver, agency_feed_lpr, index, ws_index)

        AppCommanValidation.validate_layer_name(driver,
                                                "LPN Historic Layer",
                                                agency_feed_lpr,
                                                index,
                                                ws_index,
                                                boolean_value=True)

        AppCommanValidation.validate_right_panel_layer_name(
            driver, "LPN Historic Layer", agency_feed_lpr, index, ws_index)

        AppCommanValidation.validate_feature_count(driver, "historicLayer",
                                                   agency_feed_lpr, index,
                                                   ws_index)

        AppCommanUtility.click_maximize_btn(driver, "LPR", index, ws_index)

    else:
        AppCommanUtility.click_popup_close_icon(driver, "LPR")
def fill_data_search_attribute_new_query(driver, search_attribute_select_layer_textbox_text, search_attribute_textbox_Field_text, search_attribute_textbox_Operaror_text, search_attribute_textbox_Value_text, query_name, search_attribute_tool_name, search_attribute_sub_layer_name, tools_advanced_search_search_attribute_item, index, ws_index):

    """ Method to perform fill data in new query tool """

    fill_data_advanced_search_attribure_query(driver, "Select Layer", search_attribute_select_layer_textbox_text)

    fill_data_advanced_serach_attribute_query_ddl(driver, "Select Field", tools_advanced_search_search_attribute_item, index, ws_index)
    AppCommanUtility.select_ddl_item(driver, search_attribute_textbox_Field_text, tools_advanced_search_search_attribute_item, index, ws_index)

    fill_data_advanced_serach_attribute_query_ddl(driver, "Select Operator", tools_advanced_search_search_attribute_item, index, ws_index)
    AppCommanUtility.select_ddl_item(driver, search_attribute_textbox_Operaror_text, tools_advanced_search_search_attribute_item, index, ws_index)

    AppCommanUtility.fill_data_tools_fields(driver, "Eg: 10", search_attribute_textbox_Value_text)
    select_query_title(driver, query_name, tools_advanced_search_search_attribute_item, index, ws_index)

    attribute_query_savequery_button = driver.find_element_by_class_name("attributeQuerySaveQueryButton")
    attribute_query_savequery_button.click()
    time.sleep(1)

    AppCommanUtility.click_popup_close_icon(driver, search_attribute_tool_name)

    attribute_query_search_button = driver.find_element_by_class_name("attributeQuerySearchButton")
    attribute_query_search_button.click()
    time.sleep(1)

    AppCommanUtility.click_popup_close_icon(driver, search_attribute_tool_name)
def click_navigation_item_google_street_view(driver):

    """ Method to click on google street view"""

    AppCommanUtility.click_widget_items(driver, "Google Street View")
    AppCommanUtility.click_on_map(driver)

    driver.switch_to_window(driver.window_handles[1])
def fill_data_search_attribute_prior_query(driver, query_name, search_attribute_tool_name, index, ws_index):

    """ Method to perform fill data in prior query """

    AppCommanUtility.fill_data_tools_fields(driver, "Select title", query_name)

    click_priority_ok_btn(driver, "OK", search_attribute_tool_name, index, ws_index)
    time.sleep(1)
def click_agency_feed_lpr(driver, agency_feed_lpr, agency_feed_lpr_textbox, index, ws_index):
    AppCommanUtility.click_widget_items(driver, agency_feed_lpr, index, ws_index)

    agency_feed_lpr_fill_data(driver, "License Plate Number", agency_feed_lpr_textbox, index, ws_index)

    click_lpr_live_okbtn(driver, agency_feed_lpr_textbox, index, ws_index)

    validate_agency_feed_lpr_live_tab(driver, agency_feed_lpr_textbox, agency_feed_lpr, index, ws_index)
def click_right_panel_open(driver, tool_name, index, ws_index):
    """ Method to click on right panel """

    AppCommanUtility.click_right_panel_open(driver,
                                            tool_name,
                                            index,
                                            boolean_value=True,
                                            ws_index=11)
Beispiel #17
0
def click_utilities_item_selection_proximity(
        driver, tools_utilities_selection_item, sub_layer_name,
        tool_selection_textbox_distance_text, index, ws_index):
    """ Method to select the tab proximity and fill data in proximity """

    AppCommanUtility.click_maximize_btn(driver, tools_utilities_selection_item,
                                        index, ws_index)

    AppCommanUtility.select_sub_tool(driver,
                                     "Proximity",
                                     index,
                                     ws_index,
                                     class_name="removeRightBorder")

    utilities_selection_ddl_list(driver,
                                 "Primary Objects Layer",
                                 tools_utilities_selection_item,
                                 index,
                                 ws_index,
                                 class_name="proximityRowContainer",
                                 class_name_label="proximityLabelText")
    AppCommanUtility.select_ddl_item(driver, sub_layer_name,
                                     tools_utilities_selection_item, index,
                                     ws_index)

    fill_data_utilities_selection(driver,
                                  "Distance",
                                  tool_selection_textbox_distance_text,
                                  tools_utilities_selection_item,
                                  index,
                                  ws_index,
                                  class_name="proximityRowContainer",
                                  class_name_label="proximityLabelText")

    utilities_selection_ddl_list(driver,
                                 "Unit",
                                 tools_utilities_selection_item,
                                 index,
                                 ws_index,
                                 class_name="proximityRowContainer",
                                 class_name_label="proximityLabelText")
    AppCommanUtility.select_ddl_item(driver, "Miles",
                                     tools_utilities_selection_item, index,
                                     ws_index)

    utilities_selection_ddl_list(driver,
                                 "Nearby Objects Layer",
                                 tools_utilities_selection_item,
                                 index,
                                 ws_index,
                                 class_name="proximityRowContainer",
                                 class_name_label="proximityLabelText")
    AppCommanUtility.select_ddl_item(driver, sub_layer_name,
                                     tools_utilities_selection_item, index,
                                     ws_index)

    tool_selection_click_ok_btn(driver, class_name="proximityButton", index=1)
    time.sleep(1)
def click_agency_feed_avl(driver, agency_feed_avl, index, ws_index):

    AppCommanUtility.click_widget_items(driver, agency_feed_avl, index,
                                        ws_index)

    click_avl_live_select_all_checkbox(driver, agency_feed_avl, index,
                                       ws_index)

    click_okbtn_avl_live_tab(driver, agency_feed_avl, index, ws_index)
Beispiel #19
0
def fill_data_search_attribute_prior_query(driver, query_name,
                                           search_attribute_tool_name, index,
                                           ws_index):
    """ Method to perform fill data in prior query """

    AppCommanUtility.fill_data_tools_fields(driver, "Select title", query_name)

    click_priority_ok_btn(driver, "OK", search_attribute_tool_name, index,
                          ws_index)
    time.sleep(1)
Beispiel #20
0
def select_browse_tab_layer(driver, main_layer_name, sub_layer_name,
                            tools_utilities_selection_item, index, ws_index):
    """ Method to select the layer from browse tab """

    AppCommanUtility.click_expand_button_div(driver, main_layer_name,
                                             tools_utilities_selection_item,
                                             index, ws_index)
    AppCommanUtility.click_toggel_btn(driver, sub_layer_name,
                                      tools_utilities_selection_item, index,
                                      ws_index)
def click_agency_feed_item_current_calls_for_service(
        driver, agency_feed_current_call_for_service, index, ws_index):

    AppCommanUtility.click_widget_items(driver,
                                        agency_feed_current_call_for_service,
                                        index, ws_index)

    click_live_cad_select_all_checkbox(driver)

    click_okbtn_liva_cad(driver, agency_feed_current_call_for_service, index,
                         ws_index)
def click_advanced_search_item_publish_to_AGOL(driver, tools_utilities_publish_to_AGOL_item, tool_AGOL_publish_textbox_username_text, tool_AGOL_publish_textbox_passward_text, tool_AGOL_publish_textbox_webmaptitle_text, index, ws_index):

    """ Method to click on item publish to AGOL"""

    AppCommanUtility.click_widget_items(driver, tools_utilities_publish_to_AGOL_item, index, ws_index)

    fill_data_publish_to_AGOL_tab(driver, "Username", tool_AGOL_publish_textbox_username_text, tools_utilities_publish_to_AGOL_item, index, ws_index)
    fill_data_publish_to_AGOL_tab(driver, "Password", tool_AGOL_publish_textbox_passward_text, tools_utilities_publish_to_AGOL_item, index, ws_index)
    fill_data_publish_to_AGOL_tab(driver, "Webmap Title", tool_AGOL_publish_textbox_webmaptitle_text, tools_utilities_publish_to_AGOL_item, index, ws_index)

    click_okbtn_publish_to_AGOL_tab(driver, tools_utilities_publish_to_AGOL_item, index, ws_index, class_name="publishMapButton")
def click_browse_container(driver, browse_tab_container_name,
                           category_main_layer_name, category_sub_layer_name,
                           tool_name, index, ws_index):
    """ Method to click on container of browse widget"""

    AppCommanUtility.click_browse_tab_item(driver, browse_tab_container_name,
                                           tool_name, index, ws_index)

    select_layer_browse_widget(driver, category_main_layer_name,
                               category_sub_layer_name, tool_name, index,
                               ws_index)
def click_right_tab_historic(driver, agency_feed_item_avl_unitid_text, agency_feed_avl, index, ws_index):

    AppCommanUtility.select_sub_tool(driver, "Historic", index, ws_index, class_name="removeRightBorder")

    agency_feed_avl_fill_data(driver, "Unit Id", agency_feed_avl, index, ws_index)

    agency_feed_date_fill_date(driver, "Select by Unit")

    fill_data_select_date(driver)

    click_okbtn_historic_select_by_unit_tab(driver, agency_feed_avl, index, ws_index)
    def test_browse_widget(self, index, result, browse_tab_container_name,
                           category_main_layer_name, category_sub_layer_name,
                           tool_name):
        """ Test Method """

        time.sleep(3)
        self.driver.get(
            "http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/"
        )

        # click left panel
        AppCommanUtility.click_left_panel_open(
            self.driver,
            tool_name,
            int(index),
            ws_index=11,
            method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsBrowseWidget.click_widget_icon(self.driver,
                                                      tool_name,
                                                      int(index),
                                                      ws_index=11)

        # click on predefined date range tab
        SeleniumActionsBrowseWidget.click_select_date_value(self.driver,
                                                            tool_name,
                                                            int(index),
                                                            ws_index=11)

        # click predefined date range tab
        SeleniumActionsBrowseWidget.click_predefined_daterange_tab(self.driver,
                                                                   tool_name,
                                                                   int(index),
                                                                   ws_index=11)

        # click browse container
        SeleniumActionsBrowseWidget.click_browse_container(
            self.driver,
            browse_tab_container_name,
            category_main_layer_name,
            category_sub_layer_name,
            tool_name,
            index,
            ws_index=11)

        # validate browse widget
        SeleniumActionsBrowseWidget.validate_browse_widget(
            self.driver,
            category_sub_layer_name,
            tool_name,
            index,
            ws_index=11)
Beispiel #26
0
def click_agency_feed_lpr(driver, agency_feed_lpr, agency_feed_lpr_textbox,
                          index, ws_index):
    AppCommanUtility.click_widget_items(driver, agency_feed_lpr, index,
                                        ws_index)

    agency_feed_lpr_fill_data(driver, "License Plate Number",
                              agency_feed_lpr_textbox, index, ws_index)

    click_lpr_live_okbtn(driver, agency_feed_lpr_textbox, index, ws_index)

    validate_agency_feed_lpr_live_tab(driver, agency_feed_lpr_textbox,
                                      agency_feed_lpr, index, ws_index)
def tool_bomb_blast_validation(driver,index, tool_bomb_blast_widget_name, tools_utilities_bomb_blast_item, ws_index):

    """ Method to perform validation of tool bomb blast """

    AppCommanUtility.click_down_panel(driver, tools_utilities_bomb_blast_item, index, ws_index)
    AppCommanUtility.click_select_layer_label_container(driver, tools_utilities_bomb_blast_item, index, ws_index)
    AppCommanUtility.click_right_panel_open(driver, tools_utilities_bomb_blast_item, index, boolean_value=False, ws_index=7)
    AppCommanUtility.click_graphics_tab(driver, tools_utilities_bomb_blast_item, index, ws_index)
    AppCommanValidation.validate_right_panel_layer_name(driver, tool_bomb_blast_widget_name, tools_utilities_bomb_blast_item, index, ws_index)
    AppCommanUtility.click_bottom_panel_layer(driver, tool_bomb_blast_widget_name, tools_utilities_bomb_blast_item, index, ws_index)
    AppCommanValidation.validate_feature_count_panel(driver, tools_utilities_bomb_blast_item, index, ws_index)
    AppCommanValidation.validate_feature_count(driver, tool_bomb_blast_widget_name, tools_utilities_bomb_blast_item, index, ws_index)
    TestLogBombBlast.open_py_excel_pass(index, ws_index)
Beispiel #28
0
    def test_agency_feed_current_call_for_service(
            self, index, result, agency_feed_avl,
            agency_feed_avl_unitid_textbox, agency_feed_avl_distance_textbox,
            avl_live_layer_name):
        """ Test Method """

        self.driver.get(
            "http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/"
        )

        # click left panel
        AppCommanUtility.click_left_panel_open(
            self.driver,
            agency_feed_avl,
            int(index),
            ws_index=17,
            method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsAgencyFeedAVL.click_widget_icon(self.driver,
                                                       agency_feed_avl,
                                                       int(index),
                                                       ws_index=17)

        # click agency feed item AVL
        SeleniumActionsAgencyFeedAVL.click_agency_feed_avl(self.driver,
                                                           agency_feed_avl,
                                                           int(index),
                                                           ws_index=17)

        # validate AVL tab
        SeleniumActionsAgencyFeedAVL.validate_avl_live_tab(self.driver,
                                                           agency_feed_avl,
                                                           avl_live_layer_name,
                                                           int(index),
                                                           ws_index=17)

        # click right panel
        SeleniumActionsAgencyFeedAVL.click_right_tab_historic(
            self.driver,
            agency_feed_avl_unitid_textbox,
            agency_feed_avl,
            int(index),
            ws_index=17)

        SeleniumActionsAgencyFeedAVL.click_historic_select_by_area_tab(
            self.driver,
            int(agency_feed_avl_distance_textbox),
            agency_feed_avl,
            int(index),
            ws_index=17)
Beispiel #29
0
def click_social_media_item_twitter(driver, social_media_twitter,
                                    twitter_keyword_textbox_text,
                                    twitter_distance_textbox_text,
                                    twitter_refreshtime_textbox_text, index,
                                    ws_index):

    AppCommanUtility.click_widget_items(driver, social_media_twitter, index,
                                        ws_index)

    fill_data_twitter_text_box(driver, "Keyword", twitter_keyword_textbox_text,
                               social_media_twitter, index, ws_index)
    fill_data_twitter_text_box(driver, "Distance (in Miles)",
                               twitter_distance_textbox_text,
                               social_media_twitter, index, ws_index)
    fill_data_twitter_text_box(driver, "Refresh Time (in Seconds)",
                               twitter_refreshtime_textbox_text,
                               social_media_twitter, index, ws_index)

    select_point_geometry(driver, social_media_twitter, index, ws_index)

    AppCommanUtility.click_minimize_btn(driver, social_media_twitter, index,
                                        ws_index)

    AppCommanUtility.click_on_map(driver, social_media_twitter, index,
                                  ws_index)

    AppCommanUtility.click_maximize_btn(driver, social_media_twitter, index,
                                        ws_index)

    click_ok_button(driver, social_media_twitter, index, ws_index)
def validate_social_media_youtube(driver, social_media_youtube,
                                  youtube_layer_name, index, ws_index):
    """ Method to validate the twitter social media item """
    try:
        row_tweet_container = driver.find_elements_by_class_name(
            "rowYoutubeContainer")
        row_tweet_container[0].click()
    except Exception:
        AppCommanUtility.widget_close_icon(driver, social_media_youtube, index,
                                           ws_index)
        TestResults.open_py_excel_pass(index, ws_index)
        return True

    AppCommanUtility.click_minimize_btn(driver, social_media_youtube, index,
                                        ws_index)

    YouTubeValidation.validate_youtube_highlighted_buffer(driver)

    AppCommanUtility.widget_close_icon(driver, social_media_youtube, index,
                                       ws_index)

    YouTubeValidation.validate_youtube_buffer(driver)

    AppCommanUtility.click_down_panel(driver, social_media_youtube, index,
                                      ws_index)

    AppCommanUtility.click_select_layer_label_container(
        driver, social_media_youtube, index, ws_index)

    AppCommanValidation.validate_layer_name(driver,
                                            youtube_layer_name,
                                            social_media_youtube,
                                            index,
                                            ws_index,
                                            boolean_value=True)

    AppCommanValidation.validate_right_panel_layer_name(
        driver, youtube_layer_name, social_media_youtube, index, ws_index)

    AppCommanValidation.validate_feature_count_panel(driver,
                                                     social_media_youtube,
                                                     index, ws_index)

    AppCommanValidation.validate_feature_count(driver,
                                               "youtubeResultFeatureLayer",
                                               social_media_youtube, index,
                                               ws_index)

    TestResults.open_py_excel_pass(index, ws_index)
def find_coordinates_tool_validation(driver, tools_navigation_find_coordinates_item, index, ws_index):

    """ Method to validate the tool find coordinates """

    AppCommanUtility.click_down_panel(driver, tools_navigation_find_coordinates_item, index, ws_index)
    AppCommanUtility.click_select_layer_label_container(driver, tools_navigation_find_coordinates_item, index, ws_index)
    AppCommanUtility.click_right_panel_open(driver, False, tools_navigation_find_coordinates_item, index, ws_index)
    AppCommanUtility.click_graphics_tab(driver, tools_navigation_find_coordinates_item, index, ws_index)
    AppCommanValidation.validate_right_panel_layer_name(driver, tools_navigation_find_coordinates_item, tools_navigation_find_coordinates_item, index, ws_index)

    AppCommanUtility.click_bottom_panel_layer(driver, tools_navigation_find_coordinates_item, tools_navigation_find_coordinates_item, index, ws_index)
    AppCommanValidation.validate_feature_count_panel(driver, tools_navigation_find_coordinates_item, index, ws_index)
    AppCommanValidation.validate_feature_circle_count(driver, "findCoordinates", tools_navigation_find_coordinates_item, index, ws_index)

    TestResults.open_py_excel_pass(index, ws_index)
Beispiel #32
0
class TestAgencyFeedLPR(unittest.TestCase):

    @data(*AppCommanUtility.getData(r"C:\Users\sagarkul\Desktop\DataSource.xlsx", 18))
    @unpack
    def test_agency_feed_current_call_for_service(self, index, result, agency_feed_lpr, agency_feed_lpr_textbox, agency_feed_lpr_distance_textbox):

        """ Test Method """
        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver, agency_feed_lpr, int(index), ws_index=18, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsAgencyFeedLPR.click_widget_icon(self.driver, agency_feed_lpr, int(index), ws_index=18)

        SeleniumActionsAgencyFeedLPR.click_agency_feed_lpr(self.driver, agency_feed_lpr, agency_feed_lpr_textbox, int(index), ws_index=18)

        SeleniumActionsAgencyFeedLPR.click_agency_feed_lpr_historic_select_by_lpn(self.driver, agency_feed_lpr_textbox, agency_feed_lpr, int(index), ws_index=18)

        SeleniumActionsAgencyFeedLPR.click_historic_select_by_area(self.driver, int(agency_feed_lpr_distance_textbox), agency_feed_lpr, int(index), ws_index=18)

    def setUp(self):
        """ Intiate and maximize the browser """
        self.driver = set_browser()
        self.driver.maximize_window()
Beispiel #33
0
    def test_search_coordinate_tool(self, index, result, tools_utilities_bomb_blast_item, tool_bomb_blast_bomb_type, tool_bomb_blast_widget_name):

        """ Test Method """
        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # Click left panel
        AppCommanUtility.click_left_panel_open(self.driver, tool_bomb_blast_bomb_type, int(index), ws_index=7, method_name="click_left_panel_open")

        # Click bomb blast widget icon
        SeleniumActionsToolBombBlast.click_widget_icon(self.driver, tools_utilities_bomb_blast_item, int(index), ws_index=7)

        # Click bomb blast item selection
        SeleniumActionsToolBombBlast.click_bomb_blast_item_selection(self.driver, tools_utilities_bomb_blast_item, tool_bomb_blast_bomb_type, tool_bomb_blast_widget_name, int(index),ws_index=7)

        # tool validation bomb blast
        SeleniumActionsToolBombBlast.tool_bomb_blast_validation(self.driver, int(index), tool_bomb_blast_widget_name, tools_utilities_bomb_blast_item, ws_index=7)
Beispiel #34
0
class TestToolBombBlast(unittest.TestCase):

    @data(*AppCommanUtility.getData(r"C:\Users\sagarkul\Desktop\DataSource.xlsx", 7))
    @unpack
    def test_search_coordinate_tool(self, index, result, tools_utilities_bomb_blast_item, tool_bomb_blast_bomb_type, tool_bomb_blast_widget_name):

        """ Test Method """
        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # Click left panel
        AppCommanUtility.click_left_panel_open(self.driver, tool_bomb_blast_bomb_type, int(index), ws_index=7, method_name="click_left_panel_open")

        # Click bomb blast widget icon
        SeleniumActionsToolBombBlast.click_widget_icon(self.driver, tools_utilities_bomb_blast_item, int(index), ws_index=7)

        # Click bomb blast item selection
        SeleniumActionsToolBombBlast.click_bomb_blast_item_selection(self.driver, tools_utilities_bomb_blast_item, tool_bomb_blast_bomb_type, tool_bomb_blast_widget_name, int(index),ws_index=7)

        # tool validation bomb blast
        SeleniumActionsToolBombBlast.tool_bomb_blast_validation(self.driver, int(index), tool_bomb_blast_widget_name, tools_utilities_bomb_blast_item, ws_index=7)

        # result method

    def setUp(self):
        """ Intiate and maximize the browser """
        self.driver = set_browser()
        #time.sleep(2)
        self.driver.maximize_window()

    def tearDown(self):
        """ Quit browser"""
        self.driver.close()
Beispiel #35
0
    def test_agency_feed_current_call_for_service(self, index, result, agency_feed_lpr, agency_feed_lpr_textbox, agency_feed_lpr_distance_textbox):

        """ Test Method """
        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver, agency_feed_lpr, int(index), ws_index=18, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsAgencyFeedLPR.click_widget_icon(self.driver, agency_feed_lpr, int(index), ws_index=18)

        SeleniumActionsAgencyFeedLPR.click_agency_feed_lpr(self.driver, agency_feed_lpr, agency_feed_lpr_textbox, int(index), ws_index=18)

        SeleniumActionsAgencyFeedLPR.click_agency_feed_lpr_historic_select_by_lpn(self.driver, agency_feed_lpr_textbox, agency_feed_lpr, int(index), ws_index=18)

        SeleniumActionsAgencyFeedLPR.click_historic_select_by_area(self.driver, int(agency_feed_lpr_distance_textbox), agency_feed_lpr, int(index), ws_index=18)
Beispiel #36
0
class TestAgencyFeedCurrentCallForService(unittest.TestCase):
    @data(*AppCommanUtility.getData(
        r"C:\Users\sagarkul\Desktop\DataSource.xlsx", 17))
    @unpack
    def test_agency_feed_current_call_for_service(
            self, index, result, agency_feed_avl,
            agency_feed_avl_unitid_textbox, agency_feed_avl_distance_textbox,
            avl_live_layer_name):
        """ Test Method """

        self.driver.get(
            "http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/"
        )

        # click left panel
        AppCommanUtility.click_left_panel_open(
            self.driver,
            agency_feed_avl,
            int(index),
            ws_index=17,
            method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsAgencyFeedAVL.click_widget_icon(self.driver,
                                                       agency_feed_avl,
                                                       int(index),
                                                       ws_index=17)

        # click agency feed item AVL
        SeleniumActionsAgencyFeedAVL.click_agency_feed_avl(self.driver,
                                                           agency_feed_avl,
                                                           int(index),
                                                           ws_index=17)

        # validate AVL tab
        SeleniumActionsAgencyFeedAVL.validate_avl_live_tab(self.driver,
                                                           agency_feed_avl,
                                                           avl_live_layer_name,
                                                           int(index),
                                                           ws_index=17)

        # click right panel
        SeleniumActionsAgencyFeedAVL.click_right_tab_historic(
            self.driver,
            agency_feed_avl_unitid_textbox,
            agency_feed_avl,
            int(index),
            ws_index=17)

        SeleniumActionsAgencyFeedAVL.click_historic_select_by_area_tab(
            self.driver,
            int(agency_feed_avl_distance_textbox),
            agency_feed_avl,
            int(index),
            ws_index=17)

    def setUp(self):
        """ Intiate and maximize the browser """
        self.driver = set_browser()
        self.driver.maximize_window()
Beispiel #37
0
    def test_search_coordinate_tool(self, workflow_links_text):

        """ Test Method """
        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver)

        # click widget icon
        SeleniumActionsWorkFlowWidget.click_widget_icon(self.driver)

        # click work flow link text
        SeleniumActionsWorkFlowWidget.click_workflow_link_text(self.driver, workflow_links_text)

        # validate workflow URL
        SeleniumActionsWorkFlowWidget.validate_workflow_widget(self.driver)
Beispiel #38
0
class TestToolSearchCoordinates(unittest.TestCase):

    @data(*AppCommanUtility.getData(r"C:\Users\sagarkul\Desktop\DataSource.xlsx", 10))
    @unpack
    def test_search_coordinate_tool(self, workflow_links_text):

        """ Test Method """
        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver)

        # click widget icon
        SeleniumActionsWorkFlowWidget.click_widget_icon(self.driver)

        # click work flow link text
        SeleniumActionsWorkFlowWidget.click_workflow_link_text(self.driver, workflow_links_text)

        # validate workflow URL
        SeleniumActionsWorkFlowWidget.validate_workflow_widget(self.driver)

    def setUp(self):
        """ Intiate and maximize the browser """
        self.driver = set_browser()
        self.driver.maximize_window()

    def tearDown(self):
        """ Quit browser"""
        self.driver.close()
class TestSocialMediaTwitter(unittest.TestCase):

    @data(*AppCommanUtility.getData(r"C:\Users\sagarkul\Desktop\DataSource.xlsx", 12))
    @unpack
    def test_social_media_twitter(self, index, result, social_media_twitter, twitter_keyword_textbox_text, twitter_distance_textbox_text, twitter_refreshtime_textbox_text, twitter_layer):

        """ Test Method """

        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver,social_media_twitter, int(index), ws_index=12, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsSocialMediaTwitter.click_widget_icon(self.driver, social_media_twitter, int(index), ws_index=12)

        # click social media twitter
        SeleniumActionsSocialMediaTwitter.click_social_media_item_twitter(self.driver, social_media_twitter, twitter_keyword_textbox_text, int(twitter_distance_textbox_text), int(twitter_refreshtime_textbox_text), int(index), ws_index=12)

        # validate social media twitter
        SeleniumActionsSocialMediaTwitter.validate_social_media_twitter(self.driver, social_media_twitter, twitter_layer, int(index), ws_index=12)

    def setUp(self):
        """ Intiate and maximize the browser """
        self.driver = set_browser()
        self.driver.maximize_window()

    def tearDown(self):
        """ Quit browser"""
        self.driver.close()
Beispiel #40
0
class TestAgencyFeedCurrentCallForService(unittest.TestCase):

    @data(*AppCommanUtility.getData(r"C:\Users\sagarkul\Desktop\DataSource.xlsx", 16))
    @unpack
    def test_agency_feed_current_call_for_service(self, index, result, agency_feed_current_call_for_service, agency_feed_current_call_for_service_widget_name, live_cad_layer_name):

        """ Test Method """

        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver, agency_feed_current_call_for_service, int(index), ws_index=16, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsAgencyFeedCurrentCalls.click_widget_icon(self.driver, agency_feed_current_call_for_service, int(index), ws_index=16)

        # click agency feed item
        SeleniumActionsAgencyFeedCurrentCalls.click_agency_feed_item_current_calls_for_service(self.driver, agency_feed_current_call_for_service, int(index), ws_index=16)

        # validate agency feed live CAD
        SeleniumActionsAgencyFeedCurrentCalls.validate_agency_feed_current_call_for_services(self.driver, agency_feed_current_call_for_service_widget_name, live_cad_layer_name, int(index), ws_index=16)

    def setUp(self):
        """ Intiate and maximize the browser """
        self.driver = set_browser()
        self.driver.maximize_window()

    def tearDown(self):
        """ Quit browser"""
        self.driver.close()
Beispiel #41
0
    def test_social_media_social_media_search(
            self, index, result, social_media_social_media_search,
            social_media_search_distance_textbox_text,
            social_media_search_keyword_textbox_text,
            social_media_search_refreshtime_textbox_text,
            social_media_search_select_source_item,
            social_media_search_layer_name, social_media_sub_layer):
        """ Test Method """

        self.driver.get(
            "http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/"
        )

        # click left panel
        AppCommanUtility.click_left_panel_open(
            self.driver,
            social_media_social_media_search,
            int(index),
            ws_index=15,
            method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsSocialMediaSearch.click_widget_icon(
            self.driver,
            social_media_social_media_search,
            int(index),
            ws_index=15)

        # click social media item social media search
        SeleniumActionsSocialMediaSearch.click_social_media_item_social_media_search(
            self.driver,
            social_media_social_media_search,
            int(social_media_search_distance_textbox_text),
            social_media_search_keyword_textbox_text,
            int(social_media_search_refreshtime_textbox_text),
            int(index),
            ws_index=15)

        # validate social media item social media search
        SeleniumActionsSocialMediaSearch.social_media_search_validation(
            self.driver,
            social_media_social_media_search,
            social_media_search_select_source_item,
            social_media_search_layer_name,
            social_media_sub_layer,
            int(index),
            ws_index=15)
Beispiel #42
0
def click_social_media_item_social_media_search(
        driver, social_media_social_media_search,
        social_media_search_distance_textbox_text,
        social_media_search_keyword_textbox_text,
        social_media_search_refreshtime_textbox_text, index, ws_index):

    AppCommanUtility.click_widget_items(driver,
                                        social_media_social_media_search,
                                        index, ws_index)

    fill_data_social_media_search_textbox(
        driver,
        "Distance",
        social_media_search_distance_textbox_text,
        social_media_social_media_search,
        index,
        ws_index,
        class_name="tableCellLabel")
    fill_data_social_media_search_textbox(
        driver,
        "Keyword",
        social_media_search_keyword_textbox_text,
        social_media_social_media_search,
        index,
        ws_index,
        class_name="tableCellLabel")
    check_box_social_media_search(
        driver,
        "Twitter",
        social_media_social_media_search,
        index,
        ws_index,
    )
    check_box_social_media_search(
        driver,
        "Youtube",
        social_media_social_media_search,
        index,
        ws_index,
    )

    fill_data_select_date(driver, social_media_social_media_search, index,
                          ws_index)

    select_geometry_social_media_search(driver,
                                        social_media_social_media_search,
                                        index, ws_index)
    def test_social_media_twitter(self, index, result, social_media_twitter, twitter_keyword_textbox_text, twitter_distance_textbox_text, twitter_refreshtime_textbox_text, twitter_layer):

        """ Test Method """

        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver,social_media_twitter, int(index), ws_index=12, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsSocialMediaTwitter.click_widget_icon(self.driver, social_media_twitter, int(index), ws_index=12)

        # click social media twitter
        SeleniumActionsSocialMediaTwitter.click_social_media_item_twitter(self.driver, social_media_twitter, twitter_keyword_textbox_text, int(twitter_distance_textbox_text), int(twitter_refreshtime_textbox_text), int(index), ws_index=12)

        # validate social media twitter
        SeleniumActionsSocialMediaTwitter.validate_social_media_twitter(self.driver, social_media_twitter, twitter_layer, int(index), ws_index=12)
    def test_social_media_flickr(self, index, result, social_media_flickr, flickr_distance_textbox_text, flickr_keyword_textbox_text, flickr_refreshtime_textbox_text, flickr_unit, flickr_layer):

        """ Test Method """

        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver, social_media_flickr, int(index), ws_index=14, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsSocialMediaFlickr.click_widget_icon(self.driver, social_media_flickr, int(index), ws_index=14)

        # click social media item flickr
        SeleniumActionsSocialMediaFlickr.click_social_media_item_flickr(self.driver, social_media_flickr, int(flickr_distance_textbox_text), flickr_keyword_textbox_text, int(flickr_refreshtime_textbox_text), flickr_unit, int(index), ws_index=14)

        # validate social media item flickr
        SeleniumActionsSocialMediaFlickr.validate_social_media_flickr(self.driver, social_media_flickr, flickr_layer, int(index), ws_index=14)
Beispiel #45
0
    def test_agency_feed_current_call_for_service(self, index, result, agency_feed_current_call_for_service, agency_feed_current_call_for_service_widget_name, live_cad_layer_name):

        """ Test Method """

        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver, agency_feed_current_call_for_service, int(index), ws_index=16, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsAgencyFeedCurrentCalls.click_widget_icon(self.driver, agency_feed_current_call_for_service, int(index), ws_index=16)

        # click agency feed item
        SeleniumActionsAgencyFeedCurrentCalls.click_agency_feed_item_current_calls_for_service(self.driver, agency_feed_current_call_for_service, int(index), ws_index=16)

        # validate agency feed live CAD
        SeleniumActionsAgencyFeedCurrentCalls.validate_agency_feed_current_call_for_services(self.driver, agency_feed_current_call_for_service_widget_name, live_cad_layer_name, int(index), ws_index=16)
    def test_social_media_social_media_search(self, index, result, social_media_social_media_search, social_media_search_distance_textbox_text, social_media_search_keyword_textbox_text, social_media_search_refreshtime_textbox_text, social_media_search_select_source_item, social_media_search_layer_name, social_media_sub_layer):

        """ Test Method """

        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver, social_media_social_media_search, int(index), ws_index=15, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsSocialMediaSearch.click_widget_icon(self.driver, social_media_social_media_search, int(index), ws_index=15)

        # click social media item social media search
        SeleniumActionsSocialMediaSearch.click_social_media_item_social_media_search(self.driver, social_media_social_media_search, int(social_media_search_distance_textbox_text), social_media_search_keyword_textbox_text, int(social_media_search_refreshtime_textbox_text), int(index), ws_index=15)

        # validate social media item social media search
        SeleniumActionsSocialMediaSearch.social_media_search_validation(self.driver, social_media_social_media_search, social_media_search_select_source_item, social_media_search_layer_name, social_media_sub_layer, int(index), ws_index=15)
    def test_social_media_you_tube(self, index, result, social_media_youtube, youtube_distance_textbox_text, youtube_keyword_textbox_text, youtube_refreshtime_textbox_text, youtube_units, youtube_layer_name):

        """ Test Method """

        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver, social_media_youtube, int(index), ws_index=13, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsSocialMediaYouTube.click_widget_icon(self.driver, social_media_youtube, int(index), ws_index=13)

        # click social media item you tube
        SeleniumActionsSocialMediaYouTube.click_social_media_item_you_tube(self.driver, social_media_youtube, int(youtube_distance_textbox_text), youtube_keyword_textbox_text, int(youtube_refreshtime_textbox_text), youtube_units, int(index), ws_index=13)

        # validate social media you tube
        SeleniumActionsSocialMediaYouTube.validate_social_media_youtube(self.driver, social_media_youtube, youtube_layer_name, int(index), ws_index=13)
    def test_find_coordinate_tool(self, index, result, tools_navigation_find_coordinates_item, ddl_tool_find_coordinates, ddl_select_coordinate_system_item, find_coordinates_textbox_longitude_text, find_coordinates_textbox_latitude_text, find_coordinates_textbox_long_min_text, find_coordinates_textbox_lat_min_text, find_coordinates_textbox_long_sec, find_coordinates_textbox_lat_sec, find_coordinate_textbox_zone_text, find_coordinate_textbox_zdl_text, find_coordinate_textbox_letter_text, find_coordinate_textbox_EN_text, find_coordinate_textbox_UTM_zone_text, find_coordinate_textbox_easting_text, find_coordinate_textbox_northing_text):

        """ Test Method """
        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver, tools_navigation_find_coordinates_item, int(index), ws_index=3, method_name="click_left_panel_open")

        # click widegt icon tool
        SeleniumActionsToolFindCoordinate.click_widget_icon(self.driver, tools_navigation_find_coordinates_item, int(index), ws_index=3)

        # click advanced search item find coordinates
        SeleniumActionsToolFindCoordinate.click_advanced_search_item_find_coordinate(self.driver, tools_navigation_find_coordinates_item, int(index), ws_index=3)

        # fill data in navigation tool find coordinates
        SeleniumActionsToolFindCoordinate.fill_data_navigation_find_coordinates(self.driver, ddl_tool_find_coordinates, ddl_select_coordinate_system_item, find_coordinates_textbox_longitude_text, find_coordinates_textbox_latitude_text, find_coordinates_textbox_long_min_text, find_coordinates_textbox_lat_min_text, find_coordinates_textbox_long_sec, find_coordinates_textbox_lat_sec, find_coordinate_textbox_UTM_zone_text, find_coordinate_textbox_easting_text, find_coordinate_textbox_northing_text, find_coordinate_textbox_zone_text, find_coordinate_textbox_zdl_text, find_coordinate_textbox_letter_text, find_coordinate_textbox_EN_text, tools_navigation_find_coordinates_item, int(index), ws_index=3)

        # tool validation find coordinates
        SeleniumActionsToolFindCoordinate.find_coordinates_tool_validation(self.driver, tools_navigation_find_coordinates_item, int(index), ws_index=3)
def tool_selection_buffer_validation(driver, tools_utilities_selection_item, index, ws_index):

    """ Method to validate buffer tab"""

    AppCommanUtility.click_down_panel(driver, tools_utilities_selection_item, index, ws_index)
    AppCommanUtility.click_select_layer_label_container(driver, tools_utilities_selection_item, index, ws_index)
    AppCommanUtility.click_right_panel_open(driver, True, tools_utilities_selection_item, index, ws_index)
#    AppCommanUtility.click_graphics_tab(driver)
    AppCommanValidation.validate_right_panel_layer_name(driver, tools_utilities_selection_item, tools_utilities_selection_item, index, ws_index)
    AppCommanUtility.click_bottom_panel_layer(driver, "Select Buffer Results", tools_utilities_selection_item, index, ws_index)
    AppCommanValidation.validate_feature_count_panel(driver, tools_utilities_selection_item, index, ws_index)
    AppCommanValidation.validate_feature_count(driver, "proximityResultLayer", tools_utilities_selection_item, index, ws_index)
    def test_google_street_view(self):

        """ Test Method """
        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver)

        # click widget item
        SeleniumActionsGoogleStreetView.click_widget_icon(self.driver)

        # click on google street view
        SeleniumActionsGoogleStreetView.click_navigation_item_google_street_view(self.driver)

        # validate tool google street view
        SeleniumActionsGoogleStreetView.tool_google_street_view_validation(self.driver)

        # switch to main driver
        SeleniumActionsGoogleStreetView.switch_main_driver(self.driver)
    def test_search_coordinate_tool(self, index, result, tools_navigation_show_coordinates_item, show_coordinate_lable):

        """ Test Method """
        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver,tools_navigation_show_coordinates_item, int(index), ws_index=4, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsToolShowCoordinates.click_widget_icon(self.driver, tools_navigation_show_coordinates_item, int(index), ws_index=4)

        # click tool search coordinates
        SeleniumActionsToolShowCoordinates.click_advanced_search_item_search_coordinate(self.driver, tools_navigation_show_coordinates_item, int(index), ws_index=4)

        # fill data in show coordinates tool
        SeleniumActionsToolShowCoordinates.fill_data_navigation_show_coordinates_tool(self.driver, show_coordinate_lable, tools_navigation_show_coordinates_item, int(index), ws_index=4)

        # tool validation search coordinates
        SeleniumActionsToolShowCoordinates.search_coordinates_tool_validation(self.driver, tools_navigation_show_coordinates_item, int(index), ws_index=4)
    def test_publish_to_AGOL_tool(self, index, result, tools_utilities_publish_to_AGOL_item, tool_AGOL_publish_textbox_username_text, tool_AGOL_publish_textbox_passward_text, tool_AGOL_publish_textbox_webmaptitle_text):

        """ Test Method """
        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel open
        AppCommanUtility.click_left_panel_open(self.driver, tools_utilities_publish_to_AGOL_item, int(index), ws_index=9, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsPublishAGOLPortal.click_widget_icon(self.driver, tools_utilities_publish_to_AGOL_item, int(index), ws_index=9)

        # click advance search item publish to AGOL
        SeleniumActionsPublishAGOLPortal.click_advanced_search_item_publish_to_AGOL(self.driver, tools_utilities_publish_to_AGOL_item, tool_AGOL_publish_textbox_username_text, tool_AGOL_publish_textbox_passward_text, tool_AGOL_publish_textbox_webmaptitle_text, int(index), ws_index=9)

        # fill data in arcgis signin tab
        SeleniumActionsPublishAGOLPortal.fill_credentils_arcgis_signin(self.driver)

        # tool validation publish to AGOL
        SeleniumActionsPublishAGOLPortal.tool_publish_to_AGOL_validation(self.driver, tool_AGOL_publish_textbox_webmaptitle_text, tools_utilities_publish_to_AGOL_item, int(index), ws_index=9)
def click_utilities_item_selection_proximity(driver, tools_utilities_selection_item, sub_layer_name, tool_selection_textbox_distance_text, index, ws_index):

    """ Method to select the tab proximity and fill data in proximity """

    AppCommanUtility.click_maximize_btn(driver, tools_utilities_selection_item, index, ws_index)

    AppCommanUtility.select_sub_tool(driver, "Proximity", index, ws_index, class_name="removeRightBorder")

    utilities_selection_ddl_list(driver, "Primary Objects Layer", tools_utilities_selection_item, index, ws_index, class_name="proximityRowContainer", class_name_label="proximityLabelText")
    AppCommanUtility.select_ddl_item(driver, sub_layer_name, tools_utilities_selection_item, index, ws_index)

    fill_data_utilities_selection(driver, "Distance", tool_selection_textbox_distance_text, tools_utilities_selection_item, index, ws_index, class_name="proximityRowContainer", class_name_label="proximityLabelText")

    utilities_selection_ddl_list(driver, "Unit", tools_utilities_selection_item, index, ws_index, class_name="proximityRowContainer", class_name_label="proximityLabelText")
    AppCommanUtility.select_ddl_item(driver, "Miles", tools_utilities_selection_item, index, ws_index)

    utilities_selection_ddl_list(driver, "Nearby Objects Layer", tools_utilities_selection_item, index, ws_index, class_name="proximityRowContainer", class_name_label="proximityLabelText")
    AppCommanUtility.select_ddl_item(driver, sub_layer_name, tools_utilities_selection_item, index, ws_index)

    tool_selection_click_ok_btn(driver, class_name="proximityButton", index=1)
    time.sleep(1)
    def test_agency_feed_current_call_for_service(self, index, result, agency_feed_avl, agency_feed_avl_unitid_textbox, agency_feed_avl_distance_textbox,  avl_live_layer_name):

        """ Test Method """

        self.driver.get("http://geoshieldles.usgovcloudapp.net:8080/geoshieldmissionmodule/")

        # click left panel
        AppCommanUtility.click_left_panel_open(self.driver, agency_feed_avl, int(index), ws_index=17, method_name="click_left_panel_open")

        # click widget icon
        SeleniumActionsAgencyFeedAVL.click_widget_icon(self.driver, agency_feed_avl, int(index), ws_index=17)

        # click agency feed item AVL
        SeleniumActionsAgencyFeedAVL.click_agency_feed_avl(self.driver, agency_feed_avl, int(index), ws_index=17)

        # validate AVL tab
        SeleniumActionsAgencyFeedAVL.validate_avl_live_tab(self.driver, agency_feed_avl, avl_live_layer_name, int(index), ws_index=17)

        # click right panel
        SeleniumActionsAgencyFeedAVL.click_right_tab_historic(self.driver, agency_feed_avl_unitid_textbox, agency_feed_avl, int(index), ws_index=17)

        SeleniumActionsAgencyFeedAVL.click_historic_select_by_area_tab(self.driver, int(agency_feed_avl_distance_textbox), agency_feed_avl, int(index), ws_index=17)
def click_bomb_blast_item_selection(driver, tools_utilities_bomb_blast_item, tool_bomb_blast_bomb_type, tool_bomb_blast_widget_name, index, ws_index):

    """ Method to perform click action on bomb blast item """

    AppCommanUtility.click_widget_items(driver, tools_utilities_bomb_blast_item, index, ws_index)
    time.sleep(0.5)
    select_bomb_item(driver, tool_bomb_blast_bomb_type, tools_utilities_bomb_blast_item, index, ws_index, class_name="bombThreatIconElement")
    AppCommanUtility.click_on_map(driver, tools_utilities_bomb_blast_item, index, ws_index)
    AppCommanUtility.widget_close_icon(driver, tool_bomb_blast_widget_name, index, ws_index)
def select_layer_browse_widget(driver, category_main_layer_name, category_sub_layer_name, tool_name, index, ws_index):

    """ Method to select the layer"""

    AppCommanUtility.click_expand_button_div(driver, category_main_layer_name, tool_name, index, ws_index)
    AppCommanUtility.click_toggel_btn(driver, category_sub_layer_name, tool_name, index, ws_index)
    AppCommanUtility.click_expand_button_div(driver, category_main_layer_name, tool_name, index, ws_index)

    click_down_panel_div(driver, tool_name, index, ws_index)
def click_lpr_select_by_lpn_okbtn(driver, agency_feed_lpr, index, ws_index):

    lpr_Ok_Content = driver.find_elements_by_class_name("lprOkContent")
    lpr_Ok_Content[1].click()
    time.sleep(2)

    avl_historic_layer = driver.find_element_by_id("historicLayer_layer")
    if avl_historic_layer.is_displayed():
        AppCommanUtility.click_minimize_btn(driver, "LPR", index, ws_index)

        AppCommanUtility.click_down_panel(driver, agency_feed_lpr, index, ws_index)

        AppCommanUtility.click_select_layer_label_container(driver, agency_feed_lpr, index, ws_index)

        AppCommanValidation.validate_layer_name(driver, "LPN Historic Layer", agency_feed_lpr, index, ws_index, boolean_value=True)

        AppCommanValidation.validate_right_panel_layer_name(driver, "LPN Historic Layer", agency_feed_lpr, index, ws_index)

        AppCommanValidation.validate_feature_count(driver, "historicLayer", agency_feed_lpr, index, ws_index)

        AppCommanUtility.click_maximize_btn(driver, "LPR", index, ws_index)

    else:
        AppCommanUtility.click_popup_close_icon(driver, "LPR")