Advertisement
Guest User

Untitled

a guest
May 5th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.42 KB | None | 0 0
  1. import importer
  2. import sys
  3. import unittest
  4. import xmlrunner
  5. from lib import q2_library, modal_page
  6. from pages.ngam import main_page, login_page
  7. from pages.ngam.transactions import activity_center_page
  8. from pages.ngam.transactions.funds_transfer import individual_transfers_page, multi_account_transfers_page, accounts_and_amounts_page, schedule_and_submit_page
  9.  
  10.  
  11. class MultiTransferDraft(unittest.TestCase):
  12. driver = None
  13. util = None
  14. TRACKING_ID = None
  15. ENV = 'CI'
  16. BROWSER = 'CHROME_MAC'
  17.  
  18. @classmethod
  19. def setUpClass(cls):
  20. cls.util = q2_library.Utilities()
  21. cls.util.load_config(cls)
  22. cls.driver = cls.util.get_browser()
  23. cls.url = cls.util.get_config("base_url")
  24. cls.user = cls.util.get_credentials("multi_transfer")
  25. cls.password = cls.util.get_credentials("passwordp1")
  26. cls.current_page = None
  27. cls.user_name = "AutoMultiTaxOne asfg"
  28. cls.account1 = "****-9789"
  29. cls.account2 = "****-6789"
  30. cls.account3 = "****-7887"
  31. cls.account4 = "****-9988"
  32. cls.amount1 = "9.11"
  33. cls.amount2 = "10.11"
  34. cls.amount3 = "11.11"
  35. cls.amount4 = "12.11"
  36.  
  37. def test_01_navigation(self):
  38. self.driver.get(self.url)
  39. self.driver.maximize_window()
  40. self.assertIn("4", self.driver.title, "Checking the title has the correct value")
  41.  
  42. def test_02_login_successful(self):
  43. login = login_page.LoginPage(self.driver)
  44. login.enter_username(self.user)
  45. login.enter_password(self.password)
  46. self.main_page = login.click_submit_button()
  47. msg = self.main_page.validate_welcome_msg()
  48. self.assertIn('Welcome back', msg, "Login was successful")
  49.  
  50. def test_03_funds_transfer(self):
  51. self.menu = main_page.Menu(self.driver)
  52. self.menu.open_menu_item('Transactions')
  53. self.funds_transfer = self.menu.open_menu_child_item('Funds Transfer')
  54. self.funds_transfer.wait_for_page_to_load()
  55. self.assertTrue(self.funds_transfer.is_page_loaded(), "Checking that the Funds Transfer Page got loaded")
  56.  
  57. def test_04_multi_account_transfers(self):
  58. self.funds_transfer = individual_transfers_page.FundsTransferPage(self.driver)
  59. multi_transfers = self.funds_transfer.go_to_multitransfer_tab()
  60. self.__class__.current_page = multi_transfers
  61. self.assertTrue(multi_transfers.is_page_loaded(), "Checking that the multi transfers tab got loaded")
  62.  
  63. def test_05_select_funds_transfer(self):
  64. multi_transfers = self.current_page
  65. accounts_and_amounts_tab = multi_transfers.click_on_transfers_funds()
  66. self.__class__.current_page = accounts_and_amounts_tab
  67. self.assertTrue(accounts_and_amounts_tab.is_page_loaded(), "Checking that the multi transfers tab got loaded")
  68.  
  69. def test_06_add_more_transfers(self):
  70. accounts_and_amounts_tab = self.current_page
  71. accounts_and_amounts_tab.click_on_more_transfer()
  72. is_num_of_lines_correct = accounts_and_amounts_tab.ret_num_account_lines() == 4
  73. self.assertTrue(is_num_of_lines_correct, "Checking that 4 accounts are displayed")
  74.  
  75. def test_07_fill_accounts_and_amounts(self):
  76. accounts_and_amounts_tab = self.current_page
  77. accounts_and_amounts_tab.choose_from_account(self.account1, 1)
  78. accounts_and_amounts_tab.choose_to_account(self.account2, 1)
  79. accounts_and_amounts_tab.enter_amount(self.amount1, 1)
  80. accounts_and_amounts_tab.choose_from_account(self.account2, 2)
  81. accounts_and_amounts_tab.choose_to_account(self.account3, 2)
  82. accounts_and_amounts_tab.enter_amount(self.amount2, 2)
  83. accounts_and_amounts_tab.choose_from_account(self.account3, 3)
  84. accounts_and_amounts_tab.choose_to_account(self.account2, 3)
  85. accounts_and_amounts_tab.enter_amount(self.amount3, 3)
  86. accounts_and_amounts_tab.choose_from_account(self.account4, 4)
  87. accounts_and_amounts_tab.choose_to_account(self.account1, 4)
  88. accounts_and_amounts_tab.enter_amount(self.amount4, 4)
  89. accounts_and_amounts_tab = self.current_page
  90. schedule_and_submit = accounts_and_amounts_tab.click_on_next()
  91. self.__class__.current_page = schedule_and_submit
  92. schedule_and_submit.wait_for_page_to_load()
  93. self.assertTrue(schedule_and_submit.is_page_loaded, "Checking that the Schedule & Submit page got loaded")
  94.  
  95. def test_08_verify_accounts_submit_page(self):
  96. schedule_and_submit = self.current_page
  97. schedule_and_submit.expand_nth_rec(1)
  98. schedule_and_submit.enter_memo_nth_rec("MemoMemoMemo", 1)
  99. schedule_and_submit.expand_nth_rec(1)
  100. total_transfers_is_correct = schedule_and_submit.ret_total_transfers() == "4"
  101. total_amount_is_correct = schedule_and_submit.ret_total_amount() == "$42.44"
  102. is_from_account1_correct = schedule_and_submit.ret_text_from_account(1) == self.account1
  103. is_to_account1_correct = schedule_and_submit.ret_text_to_account(1) == self.account2
  104. is_amount1_correct = schedule_and_submit.ret_text_amount(1) == "$" + self.amount1
  105. is_date1_correct = len(schedule_and_submit.ret_date(1)) > 0 and schedule_and_submit.ret_date(1) is not \
  106. "Choose above"
  107. is_from_account2_correct = schedule_and_submit.ret_text_from_account(2) == self.account2
  108. is_to_account2_correct = schedule_and_submit.ret_text_to_account(2) == self.account3
  109. is_amount2_correct = schedule_and_submit.ret_text_amount(2) == "$" + self.amount2
  110. is_date2_correct = len(schedule_and_submit.ret_date(2)) > 0 and schedule_and_submit.ret_date(2) is not \
  111. "Choose above"
  112. is_from_account3_correct = schedule_and_submit.ret_text_from_account(3) == self.account3
  113. is_to_account3_correct = schedule_and_submit.ret_text_to_account(3) == self.account2
  114. is_amount3_correct = schedule_and_submit.ret_text_amount(3) == "$" + self.amount3
  115. is_date3_correct = len(schedule_and_submit.ret_date(3)) > 0 and schedule_and_submit.ret_date(3) is not \
  116. "Choose above"
  117. is_from_account4_correct = schedule_and_submit.ret_text_from_account(4) == self.account4
  118. is_to_account4_correct = schedule_and_submit.ret_text_to_account(4) == self.account1
  119. is_amount4_correct = schedule_and_submit.ret_text_amount(4) == "$" + self.amount4
  120. is_date4_correct = len(schedule_and_submit.ret_date(4)) > 0 and schedule_and_submit.ret_date(4) is not \
  121. "Choose above"
  122. schedule_and_submit.expand_nth_rec(1)
  123. is_memo1_displayed = schedule_and_submit.ret_text_of_memo(1) == "MemoMemoMemo"
  124. schedule_and_submit.expand_nth_rec(2)
  125. is_memo2_displayed = schedule_and_submit.ret_text_of_memo(2) == ""
  126. schedule_and_submit.expand_nth_rec(3)
  127. is_memo3_displayed = schedule_and_submit.ret_text_of_memo(3) == ""
  128. schedule_and_submit.expand_nth_rec(4)
  129. is_memo4_displayed = schedule_and_submit.ret_text_of_memo(4) == ""
  130. self.assertTrue(total_amount_is_correct and total_transfers_is_correct and is_from_account1_correct and
  131. is_to_account1_correct and is_date1_correct and is_from_account2_correct and
  132. is_to_account2_correct and is_date2_correct and is_from_account3_correct and
  133. is_to_account3_correct and is_date3_correct and is_from_account4_correct and
  134. is_to_account4_correct and is_amount1_correct and is_amount2_correct and is_amount3_correct and
  135. is_amount4_correct and is_date4_correct and is_memo1_displayed and is_memo2_displayed and
  136. is_memo3_displayed and is_memo4_displayed and schedule_and_submit.is_schedule_recurring_link_displayed(),
  137. "Checking the information of Schedule & Submit page is displayed correctly")
  138.  
  139. def test_09_enter_recurring_information(self):
  140. schedule_and_submit = self.current_page
  141. schedule_and_submit.select_date()
  142. schedule_and_submit.set_recurring_schedule()
  143. schedule_and_submit.sel_quarterly_on_rec_modal()
  144. schedule_and_submit.select_date_on_rec_sch_modal()
  145. schedule_and_submit.click_save_on_rec_sch_modal()
  146. self.assertTrue(schedule_and_submit.is_page_loaded(), "Checking that the Review and Submit tab is loaded")
  147.  
  148. def test_10_validate_recurring_information(self):
  149. schedule_and_submit = self.current_page
  150. is_recurrence_correct = schedule_and_submit.is_sel_rec_sch_lnk_present("Quarterly")
  151. self.assertTrue(is_recurrence_correct, "Checking that the Review and Submit tab is loaded")
  152.  
  153. def test_11_draft_transfer(self):
  154. schedule_and_submit = self.current_page
  155. modal = schedule_and_submit.click_draft()
  156. self.__class__.current_page = modal
  157. is_title_correct = modal.get_modal_title() == "Transfers Drafted"
  158. is_modal_text_color_correct = modal.get_modal_color() == "rgba(228, 225, 4, 1)"
  159. is_modal_text_correct = modal.get_modal_text() == "Your funds transfers have been drafted but still require approval." \
  160. " Go to Activity Center to view or approve these transactions."
  161. is_modal_amount_correct = "$42.44" in modal.get_multi_draft_amount()
  162. is_batch_id_correct = len(modal.get_multi_wire_modal_data("Batch ID:")) > 0
  163. is_from_correct = "4 accounts" in modal.get_multi_wire_modal_data("From:")
  164. is_to_correct = "3 accounts" in modal.get_multi_wire_modal_data("To:")
  165. is_download_link_present = modal.is_multi_draft_download_link_present()
  166. is_recurs_data_present = "Quarterly" in modal.get_ach_draft_modal_data("Recurs")
  167. self.assertTrue(is_modal_text_correct and is_modal_text_color_correct and is_batch_id_correct and is_from_correct and
  168. is_modal_amount_correct and is_title_correct and is_to_correct and
  169. is_download_link_present and is_recurs_data_present, "Checking that the approve modal information is correct")
  170.  
  171. def test_12_go_to_activity_center(self):
  172. modal = self.current_page
  173. modal.go_to_activity_center()
  174. activity_center = activity_center_page.ActivityCenterPage(self.driver)
  175. self.__class__.current_page = activity_center
  176. activity_center.wait_for_page_to_load()
  177. is_first_transaction_not_expanded = not activity_center.is_row_expanded(1)
  178. is_second_transaction_not_expanded = not activity_center.is_row_expanded(2)
  179. is_third_transaction_not_expanded = not activity_center.is_row_expanded(3)
  180. is_fourth_transaction_not_expanded = not activity_center.is_row_expanded(4)
  181. self.assertTrue(activity_center.is_activity_center_page_loaded and is_first_transaction_not_expanded and
  182. is_second_transaction_not_expanded and is_third_transaction_not_expanded and
  183. is_fourth_transaction_not_expanded, "Checking that the Activity Center got loaded")
  184.  
  185. def test_13_ac_transfers_title_info(self):
  186. activity_center = self.current_page
  187. is_header_date_valid = len(activity_center.return_header_date()) > 0
  188. are_header_approvals_correct = activity_center.return_header_approvals() == "0 of 1"
  189. is_header_status_correct = activity_center.return_header_status() == "Drafted"
  190. is_transaction_type_correct = "Funds Transfer" in activity_center.return_header_trans_type()
  191. is_account_correct = self.account4 in activity_center.return_header_account()
  192. is_amount_correct = activity_center.return_header_amount() == "$" + self.amount4
  193. is_header_date2_valid = len(activity_center.return_header_date(2)) > 0
  194. are_header_approvals2_correct = activity_center.return_header_approvals(2) == "0 of 1"
  195. is_header_status2_correct = activity_center.return_header_status(2) == "Drafted"
  196. is_transaction_type2_correct = "Funds Transfer" in activity_center.return_header_trans_type(2)
  197. is_account2_correct = self.account3 in activity_center.return_header_account(2)
  198. is_amount2_correct = activity_center.return_header_amount(2) == "$" + self.amount3
  199. is_header_date3_valid = len(activity_center.return_header_date(3)) > 0
  200. are_header_approvals3_correct = activity_center.return_header_approvals(3) == "0 of 1"
  201. is_header_status3_correct = activity_center.return_header_status(3) == "Drafted"
  202. is_transaction_type3_correct = "Funds Transfer" in activity_center.return_header_trans_type(3)
  203. is_account3_correct = self.account2 in activity_center.return_header_account(3)
  204. is_amount3_correct = activity_center.return_header_amount(3) == "$" + self.amount2
  205. is_header_date4_valid = len(activity_center.return_header_date(4)) > 0
  206. are_header_approvals4_correct = activity_center.return_header_approvals(4) == "0 of 1"
  207. is_header_status4_correct = activity_center.return_header_status(4) == "Drafted"
  208. is_transaction_type4_correct = "Funds Transfer" in activity_center.return_header_trans_type(4)
  209. is_account4_correct = self.account1 in activity_center.return_header_account(4)
  210. is_amount4_correct = activity_center.return_header_amount(4) == "$" + self.amount1
  211. self.assertTrue(is_header_date_valid and are_header_approvals_correct and is_header_status_correct and
  212. is_transaction_type_correct and is_account_correct and is_amount_correct and
  213. is_header_date2_valid and are_header_approvals2_correct and is_header_status2_correct and
  214. is_transaction_type2_correct and is_account2_correct and is_amount2_correct and
  215. is_header_date3_valid and are_header_approvals3_correct and is_header_status3_correct and
  216. is_transaction_type3_correct and is_account3_correct and is_amount3_correct and
  217. is_header_date4_valid and are_header_approvals4_correct and is_header_status4_correct and
  218. is_transaction_type4_correct and is_account4_correct and is_amount4_correct,
  219. "Checking that the header fields are correct")
  220.  
  221.  
  222. def test_14_verify_fourth_trans_body(self):
  223. activity_center = self.current_page
  224. activity_center.scroll_the_page(0,'document.body.scrollHeight')
  225. activity_center.expand_nth_item(4)
  226. is_tracking_id_correct = len(activity_center.return_tracking_id()) > 0
  227. is_batch_id_correct = len(activity_center.return_batch_id()) > 0
  228. is_created_date_valid = len(activity_center.return_created_date1()) > 0
  229. is_created_by_correct = activity_center.return_created_by() == self.user_name
  230. is_process_date_valid = len(activity_center.return_process_date()) > 0
  231. is_amount_correct = activity_center.return_item_amount() == "$" + self.amount1
  232. is_memo_msg_correct = "MemoMemoMemo" in activity_center.return_item_description()
  233. is_from_account_correct = self.account1 in activity_center.return_item_from_account()
  234. is_to_account_correct = self.account2 in activity_center.return_item_to_account()
  235. self.assertTrue(is_tracking_id_correct and is_batch_id_correct and is_created_by_correct and
  236. is_created_date_valid and is_process_date_valid and
  237. is_amount_correct and is_from_account_correct and is_memo_msg_correct and is_to_account_correct,
  238. "Checking that the transaction information in the activity center is correct")
  239.  
  240.  
  241. def test_15_transaction_boxes_activity_center(self):
  242. activity_center = self.current_page
  243. is_drafted_box_correct = activity_center.is_trans_fld_present('Drafted')
  244. is_approvals_box_present = activity_center.is_trans_fld_present('Approval(s)')
  245. is_authorized_box_present = activity_center.is_trans_fld_present('Authorized')
  246. is_processed_box_present = activity_center.is_trans_fld_present('Processed')
  247. is_draft_box_data_valid = activity_center.is_trans_fld_data_present('Drafted', 'AutoMultiTaxOne asfg')
  248. is_approve_box_data_correct = 'Pending' in activity_center.get_trans_fld_data('Approval(s)', '1.')
  249. authorized_box_does_not_have_data = not activity_center.trans_fld_has_data('Authorized')
  250. processes_box_does_not_have_data = not activity_center.trans_fld_has_data('Processed')
  251. self.assertTrue(is_drafted_box_correct and is_approvals_box_present and is_authorized_box_present and
  252. is_processed_box_present and is_draft_box_data_valid and is_approve_box_data_correct and
  253. authorized_box_does_not_have_data and processes_box_does_not_have_data,
  254. "Checking that all the transaction boxes are present and their information is correct")
  255.  
  256. def test_14_check_if_notify_is_not_present(self):
  257. activity_center = self.current_page
  258. activity_center.click_actions_link(4)
  259. is_notify_absent = activity_center.is_actions_menu_item_present("Notify") == False
  260. self.assertTrue(is_notify_absent, "Checking if notify is not present for the recurring transfer")
  261.  
  262. def test_15_approve_payment(self):
  263. activity_center = self.current_page
  264. activity_center.wait_for_page_to_load()
  265. activity_center.click_actions_link(4)
  266. activity_center.click_actions_menu_item("Approve")
  267. modal = modal_page.ModalPage(self.driver)
  268. is_modal_color_correct = modal.return_title_color() == "rgba(228, 225, 4, 1)"
  269. is_modal_title_correct = modal.return_title_modal() == "Approve Transaction"
  270. is_modal_text_correct = modal.return_text_modal() == "Are you sure you want to approve this transaction?"
  271. self.assertTrue(is_modal_color_correct and is_modal_text_correct and is_modal_title_correct,
  272. "Checking that the confirm approval modal is shown correctly")
  273.  
  274. def test_16_approve_success_modal(self):
  275. activity_center = self.current_page
  276. activity_center.click_confirm()
  277. modal = modal_page.ModalPage(self.driver)
  278. is_title_correct = modal.return_title_modal() == "Approval Successful"
  279. is_modal_color_correct = modal.return_title_color() == "rgba(0, 154, 64, 1)"
  280. is_amount_correct = " ($" + self.amount1 + ")" in activity_center.return_modal_trans_info()
  281. self.assertTrue(is_modal_color_correct and is_title_correct and is_amount_correct,
  282. "Checking that the approve success modal is shown correctly")
  283.  
  284. def test_17_verify_transaction_status(self):
  285. modal_page.ModalPage(self.driver).click_close_modal()
  286. activity_center = self.current_page
  287. activity_center.wait_for_page_to_load()
  288. is_header_status_correct = activity_center.return_header_status(4) == "Authorized"
  289. self.assertTrue(is_header_status_correct, "Checking that the header status is now approved")
  290.  
  291. '''
  292. def test_16_go_to_notify(self):
  293. activity_center = self.current_page
  294. activity_center.click_actions_link(4)
  295. activity_center.click_actions_menu_item("Notify")
  296. is_there_a_user_disabled = activity_center.check_if_user_enabled('AutoMulitTax Two')
  297. self.assertTrue(is_there_a_user_disabled, "Checking that there is a disabled user")
  298.  
  299. def test_17_select_user_to_notify_and_send(self):
  300. activity_center = self.current_page
  301. activity_center.select_user('AutoMulitTax Two')
  302. activity_center.click_send()
  303. modal = modal_page.ModalPage(self.driver)
  304. is_modal_color_correct = modal.return_title_color() == 'rgba(0, 154, 64, 1)'
  305. is_modal_text_correct = modal.return_text_modal() == 'Notifications successfully sent to selected users.'
  306. self.assertTrue(is_modal_color_correct and is_modal_text_correct,
  307. "Checking that the notifications were sent successfully")
  308.  
  309. def test_18_approve_payment(self):
  310. modal = modal_page.ModalPage(self.driver)
  311. modal.click_close_modal()
  312. activity_center = self.current_page
  313. activity_center.scroll_the_page(0, 20)
  314. activity_center.expand_nth_item(4)
  315. activity_center.click_actions_link(4)
  316. activity_center.click_actions_menu_item("Approve")
  317. is_modal_color_correct = modal.return_title_color() == 'rgba(228, 225, 4, 1)'
  318. is_modal_title_correct = modal.return_title_modal() == 'Approve Transaction'
  319. is_modal_text_correct = modal.return_text_modal() == 'Are you sure you want to approve this transaction?'
  320. self.assertTrue(is_modal_color_correct and is_modal_text_correct and is_modal_title_correct,
  321. "Checking that the confirm approval modal is shown correctly")
  322.  
  323. def test_19_approve_success_modal(self):
  324. activity_center = self.current_page
  325. activity_center.click_confirm()
  326. modal_functions = modal_page.ModalPage(self.driver)
  327. is_title_correct = modal_functions.return_title_modal() == 'Approval Successful'
  328. is_text_correct = modal_functions.return_text_modal() == 'Transaction successfully approved.'
  329. is_modal_color_correct = modal_functions.return_title_color() == 'rgba(0, 154, 64, 1)'
  330. is_amount_correct = '$9.11' in activity_center.return_modal_trans_info()
  331. is_status_correct = "Approved" in activity_center.return_modal_trans_info()
  332. self.assertTrue(is_modal_color_correct and is_title_correct and is_amount_correct and is_status_correct and is_text_correct,
  333. "Checking that the successful modal is shown correctly")
  334.  
  335. def test_20_verify_transaction_status(self):
  336. modal_page.ModalPage(self.driver).click_close_modal()
  337. activity_center = self.current_page
  338. activity_center.wait_for_page_to_load()
  339. is_header_status_correct = activity_center.return_header_status(4) == 'Authorized'
  340. self.assertTrue(is_header_status_correct, "Checking that the header status is now approved")
  341.  
  342. def test_21_cancel_transaction(self):
  343. activity_center = self.current_page
  344. activity_center.scroll_the_page(0, 20)
  345. activity_center.click_actions_link(4)
  346. activity_center.click_actions_menu_item("Cancel")
  347. is_modal_color_correct = modal_page.ModalPage(self.driver).return_title_color() == "rgba(228, 225, 4, 1)"
  348. is_modal_title_correct = modal_page.ModalPage(self.driver).return_title_modal() == "Cancel Transaction"
  349. is_modal_text_correct = modal_page.ModalPage(self.driver).return_text_modal() == "Are you sure you want to " \
  350. "cancel this transaction?"
  351. self.assertTrue(is_modal_color_correct and is_modal_text_correct and is_modal_title_correct,
  352. "checking if the correct confirm modal showed up")
  353.  
  354. def test_22_confirm_if_cancel_is_success(self):
  355. activity_center = self.current_page
  356. activity_center.click_confirm()
  357. modal = modal_page.ModalPage(self.driver)
  358. is_title_correct = modal.return_title_modal() == "Transaction Cancelled"
  359. is_text_correct = modal.return_text_modal() == 'Transaction successfully cancelled.'
  360. is_modal_info_correct = "$9.11" in activity_center.return_modal_trans_info()
  361. is_modal_status_correct = 'Cancelled' in activity_center.return_modal_trans_info()
  362. is_modal_color_correct = modal.return_title_color() == "rgba(0, 154, 64, 1)"
  363. self.assertTrue(is_modal_color_correct and is_modal_info_correct and is_title_correct and is_modal_status_correct and is_text_correct,
  364. "Checking that the successful modal is shown correctly")
  365.  
  366. def test_23_verify_trans_status_is_cancelled(self):
  367. modal_page.ModalPage(self.driver).click_close_modal()
  368. activity_center = self.current_page
  369. activity_center.wait_for_page_to_load()
  370. activity_center.scroll_the_page(0, 40)
  371. is_header_status_correct = activity_center.return_header_status(4) == "Cancelled"
  372. is_trans_box_approval_fld_correct = 'AutoMultiTaxOne asfg - Cancelled' in activity_center.get_trans_fld_data("Approval(s)", "2.")
  373. self.assertTrue(is_header_status_correct and is_trans_box_approval_fld_correct,
  374. "Checking that the header status is now cancelled")
  375.  
  376. def test_24_log_off(self):
  377. menu = main_page.Menu(self.driver)
  378. menu.open_menu_item('Log Off')
  379. login = login_page.LoginPage(self.driver)
  380. login.wait_for_page_to_load()
  381. self.assertTrue(login.is_login_page_loaded(), "Checking that the user logged off correctly")
  382. '''
  383.  
  384. def setUp(self):
  385. self.util.set_up(self)
  386.  
  387. def tearDown(self):
  388. self.util.tear_down(self)
  389.  
  390. @classmethod
  391. def tearDownClass(cls):
  392. cls.util.close_the_browser(cls.driver)
  393.  
  394. if __name__ == '__main__':
  395. if len(sys.argv) == 2:
  396. MultiTransferDraft.ENV = sys.argv.pop()
  397. if len(sys.argv) == 3:
  398. MultiTransferDraft.BROWSER = sys.argv.pop()
  399. MultiTransferDraft.ENV = sys.argv.pop()
  400. with open('test-reports/junit.xml', 'wb') as output:
  401. unittest.main(testRunner=xmlrunner.XMLTestRunner(output=output),
  402. failfast=False, buffer=False, catchbreak=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement