from functions.base_functions_zh import * import pytest from functions.ExcelFunctions import ReadWriteExcel # Reading data from excel data_read = ReadWriteExcel( "C://Users//Administrator//PycharmProjects//PythonAutomationAIQCA//Resources//configurations//testdata//Test_data.xlsx" ) # filename to be used in screen shot test_file_name = os.path.basename(__file__) def test_logo(): redirect_urls = all_url_call() img_element_set = set() for redirect_url in redirect_urls: driver.get(redirect_url) driver.maximize_window() time.sleep(2) image_element = find_element("netapp_logo_xpath") # NetApp logo highlight_element(image_element) capture_screenshot(test_file_name) img_element_set.add(image_element) return img_element_set # test_logo()
from functions.base_functions_zh import * import pytest import allure from functions.ExcelFunctions import ReadWriteExcel # Reading data from excel data_read = ReadWriteExcel( "C://Users//Sumanth//PycharmProjects//PythonTesting//Resources//configurations//testdata//Test_data.xlsx" ) # filename to be used in screen shot test_file_name = os.path.basename(__file__) def test_metrocluster_notifications_one(): driver.get(properties_china('health_check_url')) driver.maximize_window() sleep(2) click('notifications_bell_icon_xpath') sleep(2) scroll_to_location('notifications_product_title6_new_features_xpath') sleep(1) actual_output = find_element("notifications_aiq_new_features4_xpath") print("Element Returned Test: ", actual_output.text) expected_output = properties_china( 'check_point6_metro_cluster_string_new_features4_string1') highlight_element(actual_output) capture_screenshot(test_file_name) assert actual_output.text == expected_output
from functions.ExcelFunctions import ReadWriteExcel # Reading data from excel # x = ReadWriteExcel("C:/Users/Sumanth/Downloads/nba.xlsx") y = ReadWriteExcel("C:/Users/Sumanth/Downloads/Test_data.xlsx") # print(x.read_by_col_index('nba', 3, 4)) # SF # print(x.read_by_col_name('nba', 3, 'Weight')) # 235 # print(x.get_row_count('nba')) # 458 # print(x.get_col_count('nba')) # 9 print(y.get_row_count('CA_product_names')) for value in range(1, y.get_row_count('CA_product_names')): print(value) print(y.get_cell_value('CA_product_names', value, 1)) print(y.read_by_col_name('CA_product_names', value, 'NetApp')) # writing data to excel # x.write_by_col_index('nba', 3, 4, 'SF')