本文整理汇总了Python中GeoshieldCommonFiles.TestLog类的典型用法代码示例。如果您正苦于以下问题:Python TestLog类的具体用法?Python TestLog怎么用?Python TestLog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TestLog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: click_okbtn_historic_select_by_unit_tab
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)
示例2: click_predefined_daterange_tab
def click_predefined_daterange_tab(driver, tool_name, index, ws_index):
""" Method to perform actions on daterange and predefined tab """
try:
predefined_tab = driver.find_element_by_class_name("state-selected")
predefined_tab.click()
select_predefined_tab_type(driver,tool_name, index, ws_index, class_name="layerContentRow")
date_range_tab_content = driver.find_element_by_class_name("removeRightBorder")
date_range_tab_content.click()
from_date_select_data_range = driver.find_element_by_xpath("//div[@id='widget_dijit_form_DateTextBox_0']/div[@class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer']")
from_date_select_data_range.click()
select_from_date = driver.find_element_by_xpath("//table[@id='dijit_form_DateTextBox_0_popup']/tbody/tr[1]/td[4]")
select_from_date.click()
to_date_select_date_range = driver.find_element_by_xpath("//div[@id='widget_dijit_form_DateTextBox_1']/div[@class='dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer']")
to_date_select_date_range.click()
time.sleep(2)
select_to_date = driver.find_element_by_xpath("//table[@id='dijit_form_DateTextBox_1_popup']/tbody/tr[5]/td[1]")
select_to_date.click()
time.sleep(2)
browse_ok_cancel_btn(driver, tool_name, index, ws_index)
except Exception:
TestFailScreenShots.get_screenshots(driver, tool_name, "click_predefined_daterange_tab")
TestLog.log_creation(tool_name, "click_predefined_daterange_tab", index, ws_index)
示例3: click_okbtn_avl_live_tab
def click_okbtn_avl_live_tab(driver, agency_feed_avl, index, ws_index):
try:
avl_ok_content = driver.find_element_by_class_name("avlOkContent")
avl_ok_content.click()
time.sleep(2)
except Exception:
TestFailScreenShots.get_screenshots(driver, agency_feed_avl, "click_okbtn_avl_live_tab")
TestLog.log_creation(agency_feed_avl, "click_okbtn_avl_live_tab", index, ws_index)
示例4: click_lpr_live_okbtn
def click_lpr_live_okbtn(driver, agency_feed_lpr_item, index, ws_index):
try:
lpr_Ok_Content = driver.find_elements_by_class_name("lprOkContent")
lpr_Ok_Content[0].click()
time.sleep(2)
except Exception:
TestFailScreenShots.get_screenshots(driver, agency_feed_lpr_item, "agency_feed_lpr_fill_data")
TestLog.log_creation(agency_feed_lpr_item, "agency_feed_lpr_fill_data", index, ws_index)
示例5: browse_ok_cancel_btn
def browse_ok_cancel_btn(driver, tool_name, index, ws_index):
""" Common Method to perform action on Ok button """
try:
click_ok_button = driver.find_element_by_class_name("okBtn")
click_ok_button.click()
except Exception:
TestFailScreenShots.get_screenshots(driver, tool_name, "browse_ok_cancel_btn")
TestLog.log_creation(tool_name, "browse_ok_cancel_btn", index, ws_index)
示例6: click_ok_btn
def click_ok_btn(driver, tools_navigation_find_coordinates_item, index, ws_index):
""" Method to click on OK button of find coordinates tool"""
try:
find_button = driver.find_element_by_class_name("findButton")
find_button.click()
except Exception:
TestFailScreenShots.get_screenshots(driver, tools_navigation_find_coordinates_item, "click_ok_btn")
TestLog.log_creation(tools_navigation_find_coordinates_item, "click_ok_btn", index, ws_index)
示例7: select_geometry_flickr_item
def select_geometry_flickr_item(driver, social_media_flickr, index, ws_index):
""" Method to select geometry flickr widget """
try:
flickr_inactive_rect_button = driver.find_element_by_class_name("flickrDeactivePointButton")
flickr_inactive_rect_button.click()
except Exception:
TestFailScreenShots.get_screenshots(driver, social_media_flickr, "select_geometry_flickr_item")
TestLog.log_creation(social_media_flickr, "select_geometry_flickr_item", index, ws_index)
示例8: click_point_geometry
def click_point_geometry(driver, social_media_youtube, index, ws_index, class_name):
""" Method to click on geometry """
try:
youtube_point_button = driver.find_element_by_class_name(class_name)
youtube_point_button.click()
except Exception:
TestFailScreenShots.get_screenshots(driver, social_media_youtube, "click_point_geometry")
TestLog.log_creation(social_media_youtube, "click_point_geometry", index, ws_index)
示例9: click_okbtn_publish_to_AGOL_tab
def click_okbtn_publish_to_AGOL_tab(driver,tools_utilities_publish_to_AGOL_item, index, ws_index, class_name):
""" Method to click OK button of publish to AGOL """
try:
publish_map_button = driver.find_element_by_class_name(class_name)
publish_map_button.click()
except Exception:
TestFailScreenShots.get_screenshots(driver, tools_utilities_publish_to_AGOL_item, "click_okbtn_publish_to_AGOL_tab")
TestLog.log_creation(tools_utilities_publish_to_AGOL_item, "click_okbtn_publish_to_AGOL_tab", index, ws_index)
示例10: click_youtube_submit_button
def click_youtube_submit_button(driver,social_media_youtube, index, ws_index, class_name):
""" Method to click on you tube submit button """
try:
you_tube_submit_button = driver.find_element_by_class_name(class_name)
you_tube_submit_button.click()
time.sleep(2)
except Exception:
TestFailScreenShots.get_screenshots(driver, social_media_youtube, "click_youtube_submit_button")
TestLog.log_creation(social_media_youtube, "click_youtube_submit_button", index, ws_index)
示例11: click_select_date_value
def click_select_date_value(driver, tool_name, index, ws_index):
""" Method to perform to select date"""
try:
time.sleep(3)
select_date_value = driver.find_element_by_class_name("selectedDateValue")
select_date_value.click()
except Exception:
TestFailScreenShots.get_screenshots(driver, tool_name, "click_select_date_value")
TestLog.log_creation(tool_name, "click_select_date_value", index, ws_index)
示例12: select_flickr_submit_button
def select_flickr_submit_button(driver, social_media_flickr, index, ws_index):
""" Method to click on submit button of flickr """
try:
flickr_search_submit_button = driver.find_element_by_class_name("flickrSearchSubmitButton")
flickr_search_submit_button.click()
time.sleep(2)
except Exception:
TestFailScreenShots.get_screenshots(driver, social_media_flickr, "select_flickr_submit_button")
TestLog.log_creation(social_media_flickr, "select_flickr_submit_button", index, ws_index)
示例13: select_point_geometry
def select_point_geometry(driver, social_media_twitter, index, ws_index):
""" Method to select the geometry"""
try:
time.sleep(1)
search_point_geometry = driver.find_element_by_class_name("searchPointGeometry")
search_point_geometry.click()
except Exception:
TestFailScreenShots.get_screenshots(driver, social_media_twitter, "select_point_geometry")
TestLog.log_creation(social_media_twitter, "select_point_geometry", index, ws_index)
示例14: click_widget_icon
def click_widget_icon(driver, tools_advanced_search_search_attribute_item, index, ws_index):
""" Method to perform click action on widget """
try:
time.sleep(1)
tab_item_div = driver.find_element_by_xpath("//div[@class='iconContainer']/div[@id='tools_img']")
tab_item_div.click()
except Exception:
TestFailScreenShots.get_screenshots(driver, tools_advanced_search_search_attribute_item, "click_widget_icon")
TestLog.log_creation(tools_advanced_search_search_attribute_item, "click_widget_icon", index, ws_index)
示例15: click_widget_icon
def click_widget_icon(driver, tools_navigation_find_coordinates_item, index, ws_index):
""" Method to click on widget"""
try:
time.sleep(1)
tab_item_div = driver.find_element_by_xpath("//div[@class='iconContainer']/div[@id='tools_img']")
tab_item_div.click()
except Exception:
TestFailScreenShots.get_screenshots(driver, tools_navigation_find_coordinates_item, "click_widget_icon")
TestLog.log_creation(tools_navigation_find_coordinates_item, "click_widget_icon", index, ws_index)