def login_automation_gmail_account(self, user_name, gmail_pwrd,
                                    xpected_uname):
     gmail_po = GmailLoginPageObjectsClass(self.driver)
     ca = CommonActionsClass(self.driver)
     common_utils = CommonUtilsClass()
     email_textbox_elmnt = gmail_po.email_text_box_loc()
     ca.enter_text_in_text_box(email_textbox_elmnt, user_name)
     logger.info("gmail Username:: " + user_name)
     time.sleep(3)
     next_btn_elmnt = gmail_po.next_button_loc()
     ca.click_on_webelement(next_btn_elmnt)
     time.sleep(3)
     pwrd_tbox_loc_elmnt = gmail_po.p_word_text_box_loc()
     pwrd_tbox_loc_elmnt.send_keys(Keys.TAB)
     time.sleep(3)
     gmail_password = common_utils.AES256_decrypt(master_key, gmail_pwrd)
     pwrd_tbox_loc_elmnt.send_keys(gmail_password)
     logger.info("Given gmail passcode")
     time.sleep(3)
     next_btn_elmnt = gmail_po.next_button_loc()
     ca.click_on_webelement(next_btn_elmnt)
     time.sleep(5)
     acct_elmnt = gmail_po.account_details_element()
     time.sleep(3)
     acct_elmnt.click()
     time.sleep(3)
     usr_name_elmnt = gmail_po.gmail_username_element()
     actul_usrname = usr_name_elmnt.text
     if actul_usrname == xpected_uname:
         logger.info("Logged in to the " + xpected_uname + " Gmail Account")
         return self.driver
     else:
         logger.error("Logged in to " + actul_usrname + " instead of " +
                      xpected_uname + " mail Account")
         raise AssertionError()
 def restapi_put_status(self, testrunid_key, payload):
     comm_util = CommonUtilsClass()
     url = jiraendpoint_URL + '/testrun/' + str(testrunid_key)
     auth_string = comm_util.AES256_decrypt(master_key, jiraauth_cred)
     headers = {
         'Content-Type': "application/json",
         'Authorization': "Basic " + auth_string,
         'Cache-Control': "no-cache",
     }
     response = requests.request("PUT", url, data=payload, headers=headers)
     return response.status_code
 def restapi_get_testids(self, testexecution_key):
     comm_util = CommonUtilsClass()
     url = jiraendpoint_URL + '/testexec/' + testexecution_key + '/test'
     auth_string = comm_util.AES256_decrypt(master_key, jiraauth_cred)
     headers = {
         'Content-Type': "application/json",
         'Authorization': "Basic " + auth_string,
         'Cache-Control': "no-cache",
     }
     response = requests.request("GET", url, headers=headers)
     return response.text