def click_historic_select_by_area_tab(driver, agency_feed_avl_distance_textbox,
                                      agency_feed_avl, index, ws_index):

    #"avlDeactiveRadioButton"

    avl_deactive_radio_button = driver.find_element_by_class_name(
        "avlDeactiveRadioButton")
    avl_deactive_radio_button.click()

    select_geometry_tab(driver)

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

    agency_feed_avl_fill_data(driver, "Distance",
                              agency_feed_avl_distance_textbox, index,
                              ws_index)

    #    agency_feed_date_fill_date(driver, "Select by Area")

    click_okbtn_select_by_area(driver)

    AppCommanUtility.click_popup_close_icon(driver, agency_feed_avl)

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

    validate_select_by_area_buffer(driver)
Beispiel #2
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)
Beispiel #3
0
def click_historic_select_by_area(driver, agency_feed_lpr_distance_textbox,
                                  agency_feed_lpr, index, ws_index):

    avl_deactive_radio_button = driver.find_element_by_class_name(
        "lprDeactiveRadioButton")
    avl_deactive_radio_button.click()

    select_geometry_tab(driver)

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

    agency_feed_lpr_fill_data(driver, "Distance",
                              agency_feed_lpr_distance_textbox, index,
                              ws_index)

    #    agency_feed_date_fill_date(driver, "Select by Area")

    click_okbtn_lpr_select_by_area(driver)

    AppCommanUtility.click_popup_close_icon(driver, "LPR")

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

    validate_select_by_area_buffer(driver)

    TestResults.open_py_excel_pass(index, ws_index)
def click_social_media_item_flickr(driver, social_media_flickr,
                                   flickr_distance_textbox_text,
                                   flickr_keyword_textbox_text,
                                   flickr_refreshtime_textbox_text,
                                   flickr_unit, index, ws_index):

    AppCommanUtility.click_widget_items(driver, social_media_flickr, index,
                                        ws_index)
    fill_data_flickr_textbox(driver, "Distance", flickr_distance_textbox_text,
                             social_media_flickr, index, ws_index)
    fill_data_flickr_textbox(driver, "Keyword", flickr_keyword_textbox_text,
                             social_media_flickr, index, ws_index)
    fill_data_flickr_textbox(driver, "Refresh Time (in Seconds)",
                             flickr_refreshtime_textbox_text,
                             social_media_flickr, index, ws_index)

    fill_data_flickr_ddl_item(driver, "Unit", social_media_flickr, index,
                              ws_index)
    AppCommanUtility.select_ddl_item(driver, flickr_unit)

    fill_data_select_date(driver, social_media_flickr, index, ws_index)

    select_geometry_flickr_item(driver, social_media_flickr, index, ws_index)

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

    select_flickr_submit_button(driver, social_media_flickr, index, ws_index)
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 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)
Beispiel #7
0
def click_utilities_item_selection(driver, tools_utilities_selection_item,
                                   sub_layer_name,
                                   tool_selection_textbox_distance_text, index,
                                   ws_index):
    """ Method to select the tool Selection and fill the data in buffer tab of selection"""

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

    utilities_selection_ddl_list(driver,
                                 "Select Layer",
                                 tools_utilities_selection_item,
                                 index,
                                 ws_index,
                                 class_name="selectBufferRow",
                                 class_name_label="selectBufferCellLabel")
    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="selectBufferRow",
                                  class_name_label="selectBufferCellLabel")

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

    AppCommanUtility.select_buffer_graphic_icons(driver, "Draw Point")

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

    tool_selection_click_ok_btn(driver, class_name="proximityButton", index=0)

    AppCommanUtility.click_minimize_btn(driver, tools_utilities_selection_item,
                                        index, ws_index)
def click_social_media_item_flickr(driver, social_media_flickr, flickr_distance_textbox_text, flickr_keyword_textbox_text, flickr_refreshtime_textbox_text, flickr_unit, index, ws_index):

    AppCommanUtility.click_widget_items(driver, social_media_flickr, index, ws_index)
    fill_data_flickr_textbox(driver, "Distance", flickr_distance_textbox_text, social_media_flickr, index, ws_index)
    fill_data_flickr_textbox(driver, "Keyword", flickr_keyword_textbox_text, social_media_flickr, index, ws_index)
    fill_data_flickr_textbox(driver, "Refresh Time (in Seconds)", flickr_refreshtime_textbox_text, social_media_flickr, index, ws_index)

    fill_data_flickr_ddl_item(driver, "Unit", social_media_flickr, index, ws_index)
    AppCommanUtility.select_ddl_item(driver, flickr_unit)

    fill_data_select_date(driver, social_media_flickr, index, ws_index)

    select_geometry_flickr_item(driver, social_media_flickr, index, ws_index)

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

    select_flickr_submit_button(driver, social_media_flickr, index, ws_index)
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 click_social_media_item_you_tube(driver, social_media_youtube, youtube_distance_textbox_text, youtube_keyword_textbox_text, youtube_refreshtime_textbox_text, youtube_units, index, ws_index):

    """ Method to click on social media item youtube """

    AppCommanUtility.click_widget_items(driver, social_media_youtube, index, ws_index)
    fill_data_youtube_textbox(driver, "Distance", youtube_distance_textbox_text, social_media_youtube, index, ws_index)
    fill_data_youtube_textbox(driver, "Keyword", youtube_keyword_textbox_text, social_media_youtube, index, ws_index)
    fill_data_youtube_textbox(driver, "Refresh Time (in Seconds)", youtube_refreshtime_textbox_text, social_media_youtube, index, ws_index)

    fill_data_select_date(driver, social_media_youtube, index, ws_index)

    fill_data_youtube_ddl_item(driver, "Units", social_media_youtube, index, ws_index)
    AppCommanUtility.select_ddl_item(driver, youtube_units)

    click_point_geometry(driver, social_media_youtube, index, ws_index, class_name="youtubePointGeometry")

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

    click_youtube_submit_button(driver,social_media_youtube, index, ws_index, class_name="youtubeSubmitButton")
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 click_utilities_item_selection(driver, tools_utilities_selection_item, sub_layer_name, tool_selection_textbox_distance_text, index, ws_index):

    """ Method to select the tool Selection and fill the data in buffer tab of selection"""

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

    utilities_selection_ddl_list(driver, "Select Layer", tools_utilities_selection_item, index, ws_index, class_name="selectBufferRow", class_name_label="selectBufferCellLabel")
    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="selectBufferRow", class_name_label="selectBufferCellLabel")

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

    AppCommanUtility.select_buffer_graphic_icons(driver, "Draw Point")

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

    tool_selection_click_ok_btn(driver, class_name="proximityButton", index=0)

    AppCommanUtility.click_minimize_btn(driver, tools_utilities_selection_item, index, ws_index)
def click_historic_select_by_area(driver, agency_feed_lpr_distance_textbox, agency_feed_lpr, index, ws_index):

    avl_deactive_radio_button = driver.find_element_by_class_name("lprDeactiveRadioButton")
    avl_deactive_radio_button.click()

    select_geometry_tab(driver)

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

    agency_feed_lpr_fill_data(driver, "Distance", agency_feed_lpr_distance_textbox, index, ws_index)

#    agency_feed_date_fill_date(driver, "Select by Area")

    click_okbtn_lpr_select_by_area(driver)

    AppCommanUtility.click_popup_close_icon(driver, "LPR")

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

    validate_select_by_area_buffer(driver)

    TestResults.open_py_excel_pass(index, ws_index)
def click_historic_select_by_area_tab(driver, agency_feed_avl_distance_textbox, agency_feed_avl, index, ws_index):

    #"avlDeactiveRadioButton"

    avl_deactive_radio_button = driver.find_element_by_class_name("avlDeactiveRadioButton")
    avl_deactive_radio_button.click()

    select_geometry_tab(driver)

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

    agency_feed_avl_fill_data(driver, "Distance", agency_feed_avl_distance_textbox, index, ws_index)

#    agency_feed_date_fill_date(driver, "Select by Area")

    click_okbtn_select_by_area(driver)

    AppCommanUtility.click_popup_close_icon(driver, agency_feed_avl)

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

    validate_select_by_area_buffer(driver)
def click_social_media_item_you_tube(driver, social_media_youtube,
                                     youtube_distance_textbox_text,
                                     youtube_keyword_textbox_text,
                                     youtube_refreshtime_textbox_text,
                                     youtube_units, index, ws_index):
    """ Method to click on social media item youtube """

    AppCommanUtility.click_widget_items(driver, social_media_youtube, index,
                                        ws_index)
    fill_data_youtube_textbox(driver, "Distance",
                              youtube_distance_textbox_text,
                              social_media_youtube, index, ws_index)
    fill_data_youtube_textbox(driver, "Keyword", youtube_keyword_textbox_text,
                              social_media_youtube, index, ws_index)
    fill_data_youtube_textbox(driver, "Refresh Time (in Seconds)",
                              youtube_refreshtime_textbox_text,
                              social_media_youtube, index, ws_index)

    fill_data_select_date(driver, social_media_youtube, index, ws_index)

    fill_data_youtube_ddl_item(driver, "Units", social_media_youtube, index,
                               ws_index)
    AppCommanUtility.select_ddl_item(driver, youtube_units)

    click_point_geometry(driver,
                         social_media_youtube,
                         index,
                         ws_index,
                         class_name="youtubePointGeometry")

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

    click_youtube_submit_button(driver,
                                social_media_youtube,
                                index,
                                ws_index,
                                class_name="youtubeSubmitButton")
Beispiel #16
0
def select_geometry_social_media_search(driver,
                                        social_media_social_media_search,
                                        index, ws_index):

    select_geometry_container = driver.find_element_by_class_name(
        "selectGeometryContainer")
    select_geometry_container_div = select_geometry_container.find_element_by_class_name(
        "selectPointGeometry")
    select_geometry_container_div.click()

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

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

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

    click_social_media_search_ok_btn(driver, social_media_social_media_search,
                                     index, ws_index)