def retail_location_click(target_name, **kwargs): target = target_name.lower() if target == 'location name input': location = locations.RetailLocation.Inputs.name helpers.click_or_type(location, **kwargs) elif target == 'location codes input': location = locations.RetailLocation.Inputs.location_codes helpers.textarea_field_click_or_type(location, **kwargs) elif target == 'state input': location = locations.RetailLocation.Inputs.state helpers.input_field_click_or_select(location, **kwargs) elif target == 'limit search select': location = locations.RetailLocation.Selects.limit_search helpers.click_or_select(location, **kwargs) elif target == 'state add all button': location = locations.RetailLocation.Buttons.state_add_all helpers.click_helper(location) elif target == 'state remove all button': location = locations.RetailLocation.Buttons.state_remove_all helpers.click_helper(location) else: print(warn.INVALID_CLICK_TARGET, target)
def set_up_campaign_click(target_name, **kwargs): target = target_name.lower() if target == 'campaign title input': location = locations.SetUpCampaign.Inputs.campaign_title helpers.click_or_type(location, **kwargs) elif target == 'include customers input': return helpers.click_helper( locations.SetUpCampaign.Inputs.include_customers) elif target == 'omit customers input': return helpers.click_helper( locations.SetUpCampaign.Inputs.omit_customers) elif target == 'missing exemption input': return helpers.click_helper( locations.SetUpCampaign.Inputs.missing_exemption) elif target == 'invalid exemption input': return helpers.click_helper( locations.SetUpCampaign.Inputs.invalid_exemption) elif target == 'expired certificate input': return helpers.click_helper( locations.SetUpCampaign.Inputs.expired_certificate) elif target == 'include soon to expire input': return helpers.click_helper( locations.SetUpCampaign.Inputs.include_soon_to_expire) elif target == 'include soon to expire days input': return helpers.click_helper( locations.SetUpCampaign.Inputs.include_soon_to_expire_days) elif target == 'taxable exposures input': return helpers.click_helper( locations.SetUpCampaign.Inputs.taxable_exposures) elif target == 'override input': return helpers.click_helper(locations.SetUpCampaign.Inputs.override) elif target == 'billing customers input': return helpers.click_helper( locations.SetUpCampaign.Inputs.billing_customers) elif target == 'shipping customers input': return helpers.click_helper( locations.SetUpCampaign.Inputs.shipping_customers) elif target == 'exclude same as input': return helpers.click_helper( locations.SetUpCampaign.Inputs.exclude_same_as) elif target == 'expand bill to ship input': return helpers.click_helper( locations.SetUpCampaign.Inputs.expand_bill_to_ship) elif target == 'exempt reasons input': location = locations.SetUpCampaign.Inputs.exempt_reasons helpers.input_field_click_or_select(location, **kwargs) elif target == 'select all link': return helpers.click_helper(locations.SetUpCampaign.Links.select_all) elif target == 'deselect all link': return helpers.click_helper(locations.SetUpCampaign.Links.deselect_all) elif target == 'document type select': location = locations.SetUpCampaign.Selects.document_type helpers.click_or_select(location, **kwargs) elif target == 'prepare campaign button': # Attempting to return this element causes an error # driver.find_element_by_xpath(locations.SetUpCampaign.Buttons.prepare_campaign).click() location = locations.SetUpCampaign.Buttons.prepare_campaign helpers.click_helper(location) time.sleep(2) else: print(warn.INVALID_CLICK_TARGET)
def validate_document_window_click(target_name, **kwargs): target = target_name.lower() if target == 'customers input': location = locations.ValidateDocumentWindow.Inputs.customers helpers.validation_customers_click_or_select(location, **kwargs) elif target == 'created date input': location = locations.ValidateDocumentWindow.Inputs.created_date helpers.click_or_type_date(location, **kwargs) elif target == 'effective date input': location = locations.ValidateDocumentWindow.Inputs.effective_Date helpers.click_or_type_date(location, **kwargs) elif target == 'single use checkbox input': location = locations.ValidateDocumentWindow.Inputs.single_use_checkbox helpers.click_or_type(location, **kwargs) elif target == 'exposure zones input': location = locations.ValidateDocumentWindow.Inputs.exposure_zones helpers.input_field_click_or_select(location, **kwargs) elif target == 'invalid reasons input': location = locations.ValidateDocumentWindow.Inputs.invalid_reasons helpers.click_or_type(location, **kwargs) elif target == 'customer attributes input': location = locations.ValidateDocumentWindow.Inputs.customer_attributes helpers.click_helper(location) elif target == 'documents attributes input': location = locations.ValidateDocumentWindow.Inputs.document_attributes helpers.click_or_type(location, **kwargs) elif target[0:24] == 'exposure zone tax id row' and target[-5:] == 'input': if target[26] == ' ': number = target[25] # Supports single digits helpers.click_helper( locations.ValidateDocumentWindow.Inputs. exposure_zone_tax_id_row(number)) elif target[27] == ' ': number = target[25:26] # Supports double digits helpers.click_helper( locations.ValidateDocumentWindow.Inputs. exposure_zone_tax_id_row(number)) else: print(warn.SOME_PROBLEM) elif target[0:29] == 'exposure zone expire date row' and target[ -5:] == 'input': if target[31] == ' ': number = target[30] # Supports single digits helpers.click_helper( locations.ValidateDocumentWindow.Inputs. exposure_zone_expire_date_row(number)) elif target[32] == ' ': number = target[30:31] # Supports double digits helpers.click_helper( locations.ValidateDocumentWindow.Inputs. exposure_zone_expire_date_row(number)) else: print(warn.SOME_PROBLEM) elif target[0:24] == 'exposure zone exempt percentage row' and target[ -5:] == 'input': if target[37] == ' ': number = target[36] # Supports single digits helpers.click_helper( locations.ValidateDocumentWindow.Inputs. exposure_zone_exempt_percentage_row(number)) elif target[38] == ' ': number = target[36:37] # Supports double digits helpers.click_helper( locations.ValidateDocumentWindow.Inputs. exposure_zone_exempt_percentage_row(number)) else: print(warn.SOME_PROBLEM) elif target == 'escalate explain input': location = locations.ValidateDocumentWindow.Inputs.escalate_explain helpers.click_or_type_date(location, **kwargs) elif target == 'document type select': location = locations.ValidateDocumentWindow.Selects.document_type helpers.click_or_select(location, **kwargs) elif target == 'exempt reason select': location = locations.ValidateDocumentWindow.Selects.exempt_reason helpers.click_or_select(location, **kwargs) elif target == 'location select': location = locations.ValidateDocumentWindow.Selects.location helpers.click_or_select(location, **kwargs) elif target == 'state select': location = locations.ValidateDocumentWindow.Selects.filter_state helpers.click_or_select(location, **kwargs) elif target == 'attribute group select': location = locations.ValidateDocumentWindow.Selects.filter_attribute_group helpers.click_or_select(location, **kwargs) elif target == 'attribute select': location = locations.ValidateDocumentWindow.Selects.filter_attribute helpers.click_or_select(location, **kwargs) elif target == 'escalate reason select': location = locations.ValidateDocumentWindow.Selects.escalate_reason helpers.click_or_select(location, **kwargs) elif target == 'delete button': location = locations.ValidateDocumentWindow.Buttons.delete helpers.click_helper(location) elif target == 'defaults button': location = locations.ValidateDocumentWindow.Buttons.defaults helpers.click_helper(location) elif target == 'release button': location = locations.ValidateDocumentWindow.Buttons.release helpers.click_helper(location) elif target == 'download button': location = locations.ValidateDocumentWindow.Buttons.download helpers.click_helper(location) elif target == 'escalate button': location = locations.ValidateDocumentWindow.Buttons.escalate helpers.click_helper(location) elif target == 'validate button': location = locations.ValidateDocumentWindow.Buttons.validate helpers.click_helper(location) elif target == 'advanced search button': location = locations.ValidateDocumentWindow.Buttons.advanced_search helpers.click_helper(location) elif target == 'add customer button': location = locations.ValidateDocumentWindow.Buttons.add_customer helpers.click_helper(location) elif target == 'bulk add button': location = locations.ValidateDocumentWindow.Buttons.bulk_add helpers.click_helper(location) elif target == 'effective date button': location = locations.ValidateDocumentWindow.Buttons.date_picker_effective_date helpers.click_helper(location) elif target == 'clear button': location = locations.ValidateDocumentWindow.Buttons.clear helpers.click_helper(location) elif target == 'expire date button': location = locations.ValidateDocumentWindow.Buttons.date_picker_expire_date helpers.click_helper(location) elif target == 'never expire button': location = locations.ValidateDocumentWindow.Buttons.never_expire helpers.click_helper(location) elif target == 'validate ids button': location = locations.ValidateDocumentWindow.Buttons.validate_ids helpers.click_helper(location) elif target == 'success ok button': location = locations.ValidateDocumentWindow.Buttons.success_ok helpers.click_helper(location) time.sleep(2) helpers.close_extra_windows() elif target == 'escalate x button': location = locations.ValidateDocumentWindow.Buttons.escalate_x helpers.click_helper(location) elif target == 'escalate escalate button': location = locations.ValidateDocumentWindow.Buttons.escalate_escalate helpers.click_helper(location) else: print(warn.INVALID_CLICK_TARGET)
def click(target_name, **kwargs): target = target_name.lower() if target == 'add account button': helpers.click_helper(locations.Buttons.add_account) elif target == 'provision avatax account button': helpers.click_helper(locations.Buttons.provision_avatax_account) elif target == 'filter button': helpers.click_helper(locations.Buttons.filter) elif target == 'account list link': helpers.click_helper(locations.Links.account_list) elif target == 'account statistics link': helpers.click_helper(locations.Links.account_statistics) elif target == 'account / database name input': location = locations.Inputs.account_database_name helpers.click_or_type(location, **kwargs) elif target == 'zuora / avatax account id input': location = locations.Inputs.zuora_avatax_id helpers.click_or_type(location, **kwargs) elif target == 'filter tier input': location = locations.Inputs.filter_tier helpers.input_field_click_or_select(location, **kwargs) elif target == 'filter server input': location = locations.Inputs.filter_server helpers.input_field_click_or_select(location, **kwargs) elif target == 'filter status input': location = locations.Inputs.filter_status helpers.input_field_click_or_select(location, **kwargs) elif target == 'first top button': location = locations.Buttons.first_top helpers.click_helper(location) elif target == 'prev top button': location = locations.Buttons.prev_top helpers.click_helper(location) elif target == 'next top button': location = locations.Buttons.next_top helpers.click_helper(location) elif target == 'last top button': location = locations.Buttons.last_top helpers.click_helper(location) elif target == 'first bottom button': location = locations.Buttons.first_bottom helpers.click_helper(location) elif target == 'prev bottom button': location = locations.Buttons.prev_bottom helpers.click_helper(location) elif target == 'next bottom button': location = locations.Buttons.next_bottom helpers.click_helper(location) elif target == 'last bottom button': location = locations.Buttons.last_bottom helpers.click_helper(location) elif target == 'page select top button': location = locations.Buttons.page_select_top helpers.click_helper(location) elif target == 'page select bottom button': location = locations.Buttons.page_select_bottom helpers.click_helper(location) elif target == 'id header link': location = locations.Links.id_header helpers.click_helper(location) elif target == 'name header link': location = locations.Links.name_header helpers.click_helper(location) elif target == 'tier header link': location = locations.Links.tier_header helpers.click_helper(location) elif target == 'zuora id header link': location = locations.Links.zuora_id_header helpers.click_helper(location) elif target == 'database server header link': location = locations.Links.database_server_header helpers.click_helper(location) elif target == 'database name header link': location = locations.Links.database_name_header helpers.click_helper(location) else: print('Invalid click target requested')
def click(target_name, **kwargs): target = target_name.lower() if target == 'generate request button' or target == 'generate request top button': helpers.click_helper(locations.Buttons.generate_request_top) time.sleep(2) elif target == 'generate request bottom button': helpers.click_helper(locations.Buttons.generate_request_bottom) time.sleep(2) elif target == 'add exposure zone button' or target == 'add shipto state/zone button' \ or target == 'add shipto zone button': helpers.click_helper(locations.Buttons.add_exposure_zone) elif target == 'customer search input': location = locations.Inputs.search_customer_name_number helpers.single_request_recipient_click_or_select(location, **kwargs) elif target == 'customer number / name input': location = locations.Inputs.customer helpers.single_request_recipient_click_or_select(location, **kwargs) elif target == 'return date input': location = locations.Inputs.return_date helpers.click_or_type_date(location, **kwargs) elif target == 'email address input' or target == 'email input': location = locations.Inputs.email_address helpers.click_or_type(location, **kwargs) elif target == 'fax number input': location = locations.Inputs.fax_number helpers.click_or_type(location, **kwargs) elif target == 'exposure zone select all link': helpers.click_helper(locations.Links.exposure_zones_select_all) elif target == 'exposure zone select none link': helpers.click_helper(locations.Links.exposure_zones_select_none) elif target == 'exposure zone select default link': helpers.click_helper(locations.Links.exposure_zones_select_default) elif target == 'exempt reason select all link': helpers.click_helper(locations.Links.exempt_reasons_select_all) elif target == 'exempt reason deselect all link' or target == 'exempt reason de-select all link': helpers.click_helper(locations.Links.exempt_reasons_deselect_all) elif target == 'exemption certificate templates select all link' or target == 'templates select all link': helpers.click_helper(locations.Links.templates_select_all) elif target == 'exemption certificate templates deselect all link' \ or target == 'exemption certificate templates de-select all link' \ or target == 'templates deselect all link' \ or target == 'templates de-select all link': helpers.click_helper(locations.Links.templates_deselect_all) elif target == 'company select': # Disabled field... location = locations.Selects.company helpers.click_helper(location) elif target == 'delivery method select': location = locations.Selects.delivery_method helpers.click_or_select(location, **kwargs) elif target == 'cover letter select': location = locations.Selects.cover_letter helpers.click_or_select(location, **kwargs) elif target == 'exempt reason input' or target == 'document category input': location = locations.Inputs.exempt_reason helpers.input_field_click_or_select(location, **kwargs) elif target == 'document type select': location = locations.Selects.document_type helpers.click_or_select(location, **kwargs) else: print('Invalid target requested.')
def certificate_invalid_reasons_click(target_name, **kwargs): target = target_name.lower() if target == 'certificate has invalid reasons input': location = locations.CertificateInvalidReasons.Inputs.certificate_has_invalid_reasons helpers.input_field_click_or_select(location, **kwargs) elif target == 'certificate does not have invalid reasons input': location = locations.CertificateInvalidReasons.Inputs.certificate_does_not_have_invalid_reasons helpers.input_field_click_or_select(location, **kwargs) elif target == 'certificate invalid reasons date begin input': location = locations.CertificateInvalidReasons.Inputs.certificate_invalid_reasons_date_begin helpers.input_field_click_or_select(location, **kwargs) elif target == 'certificate invalid reasons date end input': location = locations.CertificateInvalidReasons.Inputs.certificate_invalid_reasons_date_end helpers.input_field_click_or_select(location, **kwargs) elif target == 'certificate invalid reasons date ago input': location = locations.CertificateInvalidReasons.Inputs.certificate_invalid_reasons_days_ago helpers.input_field_click_or_select(location, **kwargs) elif target == 'certificate invalid reasons date to input': location = locations.CertificateInvalidReasons.Inputs.certificate_invalid_reasons_days_to helpers.input_field_click_or_select(location, **kwargs) elif target == 'certificate has invalid reasons select': location = locations.CertificateInvalidReasons.Selects.certificate_has_invalid_reasons helpers.click_or_select(location, **kwargs) elif target == 'certificate does not have invalid reasons select': location = locations.CertificateInvalidReasons.Selects.certificate_does_not_have_invalid_reasons helpers.click_or_select(location, **kwargs) elif target == 'reason added date select': location = locations.CertificateInvalidReasons.Selects.reason_added_date helpers.click_or_select(location, **kwargs) elif target == 'certificate has invalid reasons add all button': location = locations.CertificateInvalidReasons.Buttons.certificate_has_invalid_reasons_add_all helpers.click_helper(location) elif target == 'certificate has invalid reasons remove all button': location = locations.CertificateInvalidReasons.Buttons.certificate_has_invalid_reasons_remove_all helpers.click_helper(location) elif target == 'certificate does not have invalid reasons add all button': location = locations.CertificateInvalidReasons.Buttons.certificate_does_not_have_invalid_reasons_add_all helpers.click_helper(location) elif target == 'certificate does not have invalid reasons remove all button': location = locations.CertificateInvalidReasons.Buttons.certificate_does_not_have_invalid_reasons_remove_all helpers.click_helper(location) else: print(warn.INVALID_CLICK_TARGET, target)
def certificate_criteria_click(target_name, **kwargs): target = target_name.lower() if target == 'certificate ids input': location = locations.CertificateCriteria.Inputs.certificate_ids helpers.textarea_field_click_or_type(location, **kwargs) elif target == 'status input': location = locations.CertificateCriteria.Inputs.status helpers.input_field_click_or_select(location, **kwargs) elif target == 'exposure zone input': location = locations.CertificateCriteria.Inputs.exposure_zone helpers.input_field_click_or_select(location, **kwargs) elif target == 'exempt percent input': location = locations.CertificateCriteria.Inputs.exempt_percent helpers.click_or_type(location, **kwargs) elif target == 'po number input': location = locations.CertificateCriteria.Inputs.po_number helpers.click_or_type(location, **kwargs) elif target == 'tax number input': location = locations.CertificateCriteria.Inputs.tax_number helpers.click_or_type(location, **kwargs) elif target == 'certificate created date begin input': location = locations.CertificateCriteria.Inputs.certificate_created_date_begin helpers.click_or_type(location, **kwargs) elif target == 'certificate created date end input': location = locations.CertificateCriteria.Inputs.certificate_created_date_end helpers.click_or_type(location, **kwargs) elif target == 'certificate created date ago input': location = locations.CertificateCriteria.Inputs.certificate_created_days_ago helpers.click_or_type(location, **kwargs) elif target == 'certificate created date to input': location = locations.CertificateCriteria.Inputs.certificate_created_days_to helpers.click_or_type(location, **kwargs) elif target == 'certificate modified date begin input': location = locations.CertificateCriteria.Inputs.certificate_modified_date_begin helpers.click_or_type(location, **kwargs) elif target == 'certificate modified date end input': location = locations.CertificateCriteria.Inputs.certificate_modified_date_end helpers.click_or_type(location, **kwargs) elif target == 'certificate modified date ago input': location = locations.CertificateCriteria.Inputs.certificate_modified_days_ago helpers.click_or_type(location, **kwargs) elif target == 'certificate modified date to input': location = locations.CertificateCriteria.Inputs.certificate_modified_days_to helpers.click_or_type(location, **kwargs) elif target == 'certificate signed date begin input': location = locations.CertificateCriteria.Inputs.certificate_signed_date_begin helpers.click_or_type(location, **kwargs) elif target == 'certificate signed date end input': location = locations.CertificateCriteria.Inputs.certificate_signed_date_end helpers.click_or_type(location, **kwargs) elif target == 'certificate signed date ago input': location = locations.CertificateCriteria.Inputs.certificate_signed_days_ago helpers.click_or_type(location, **kwargs) elif target == 'certificate signed date to input': location = locations.CertificateCriteria.Inputs.certificate_signed_days_to helpers.click_or_type(location, **kwargs) elif target == 'certificate expiration date begin input': location = locations.CertificateCriteria.Inputs.certificate_expiration_date_begin helpers.click_or_type(location, **kwargs) elif target == 'certificate expiration date end input': location = locations.CertificateCriteria.Inputs.certificate_expiration_date_end helpers.click_or_type(location, **kwargs) elif target == 'certificate expiration date ago input': location = locations.CertificateCriteria.Inputs.certificate_expiration_days_ago helpers.click_or_type(location, **kwargs) elif target == 'certificate expiration date to input': location = locations.CertificateCriteria.Inputs.certificate_expiration_days_to helpers.click_or_type(location, **kwargs) elif target == 'has customer select': location = locations.CertificateCriteria.Selects.has_customer helpers.click_or_select(location, **kwargs) elif target == 'certificate is valid select': location = locations.CertificateCriteria.Selects.valid helpers.click_or_select(location, **kwargs) elif target == 'expired select': location = locations.CertificateCriteria.Selects.expired helpers.click_or_select(location, **kwargs) elif target == 'link type select': location = locations.CertificateCriteria.Selects.link_type helpers.click_or_select(location, **kwargs) elif target == 'is single select': location = locations.CertificateCriteria.Selects.is_single helpers.click_or_select(location, **kwargs) elif target == 'create date select': location = locations.CertificateCriteria.Selects.certificate_create_date_format helpers.click_or_select(location, **kwargs) elif target == 'modified date select': location = locations.CertificateCriteria.Selects.certificate_modified_date_format helpers.click_or_select(location, **kwargs) elif target == 'effective date select': location = locations.CertificateCriteria.Selects.certificate_signed_date_format helpers.click_or_select(location, **kwargs) elif target == 'expiration date select': location = locations.CertificateCriteria.Selects.certificate_expiration_date_day_range helpers.click_or_select(location, **kwargs) elif target == 'effective date days ago days from now select': location = locations.CertificateCriteria.Selects.certificate_signed_date_day_range helpers.click_or_select(location, **kwargs) elif target == 'expiration date days ago days from now select': location = locations.CertificateCriteria.Selects.certificate_expiration_date_day_range helpers.click_or_select(location, **kwargs) elif target == 'status add all button': helpers.click_helper( locations.CertificateCriteria.Buttons.status_add_all) elif target == 'status remove all button': helpers.click_helper( locations.CertificateCriteria.Buttons.status_remove_all) elif target == 'exposure zone add all button': helpers.click_helper( locations.CertificateCriteria.Buttons.exposure_zone_add_all) elif target == 'exposure zone remove all button': helpers.click_helper( locations.CertificateCriteria.Buttons.exposure_zone_remove_all) else: print(warn.INVALID_CLICK_TARGET, target)
def certificate_exempt_exposure_reason_click(target_name, **kwargs): target = target_name.lower() if target == 'certificate reason in exposure zones input': location = locations.CertificateExemptExposureReasons.Inputs.certificate_reason_in_exposure_zones helpers.input_field_click_or_select(location, **kwargs) elif target == 'certificate has documented reasons input': location = locations.CertificateExemptExposureReasons.Inputs.certificate_has_documented_reasons helpers.input_field_click_or_select(location, **kwargs) elif target == 'certificate does not have documented reasons input': location = locations.CertificateExemptExposureReasons.Inputs.certificate_does_not_have_documented_reasons helpers.input_field_click_or_select(location, **kwargs) elif target == 'certificate has expected reasons input': location = locations.CertificateExemptExposureReasons.Inputs.certificate_has_expected_reasons helpers.input_field_click_or_select(location, **kwargs) elif target == 'certificate does not have expected reasons input': location = locations.CertificateExemptExposureReasons.Inputs.certificate_does_not_have_expected_reasons helpers.input_field_click_or_select(location, **kwargs) elif target == 'certificate reason in exposure zones select': location = locations.CertificateExemptExposureReasons.Selects.certificate_reason_in_exposure_zones helpers.click_or_select(location, **kwargs) elif target == 'certificate reason has documented reasons select': location = locations.CertificateExemptExposureReasons.Selects.certificate_has_documented_reasons helpers.click_or_select(location, **kwargs) elif target == 'certificate reason does not have documented reasons select': location = locations.CertificateExemptExposureReasons.Selects.certificate_does_not_have_documented_reasons helpers.click_or_select(location, **kwargs) elif target == 'certificate reason has expected reasons select': location = locations.CertificateExemptExposureReasons.Selects.certificate_has_expected_reasons helpers.click_or_select(location, **kwargs) elif target == 'certificate reason does not have expected reasons select': location = locations.CertificateExemptExposureReasons.Selects.certificate_does_not_have_expected_reasons helpers.click_or_select(location, **kwargs) elif target == 'certificate reason in exposure zones add all button': location = locations.CertificateExemptExposureReasons.Buttons.certificate_reason_in_exposure_zones_add_all helpers.click_helper(location) elif target == 'certificate reason in exposure zones remove all button': location = locations.CertificateExemptExposureReasons.Buttons.certificate_reason_in_exposure_zones_remove_all helpers.click_helper(location) elif target == 'certificate has documented reasons add all button': location = locations.CertificateExemptExposureReasons.Buttons.certificate_has_documented_reasons_add_all helpers.click_helper(location) elif target == 'certificate has documented reasons remove all button': location = locations.CertificateExemptExposureReasons.Buttons.certificate_has_documented_reasons_remove_all helpers.click_helper(location) elif target == 'certificate does not have documented reasons add all button': location = locations.CertificateExemptExposureReasons.Buttons.certificate_does_not_have_documented_reasons_add_all helpers.click_helper(location) elif target == 'certificate does not have documented reasons remove all button': location = locations.CertificateExemptExposureReasons.Buttons.certificate_does_not_have_documented_reasons_remove_all helpers.click_helper(location) elif target == 'certificate has expected reasons add all button': location = locations.CertificateExemptExposureReasons.Buttons.certificate_has_expected_reasons_add_all helpers.click_helper(location) elif target == 'certificate has expected reasons remove all button': location = locations.CertificateExemptExposureReasons.Buttons.certificate_has_expected_reasons_remove_all helpers.click_helper(location) elif target == 'certificate does not have expected reasons add all button': location = locations.CertificateExemptExposureReasons.Buttons.certificate_does_not_have_expected_reasons_add_all helpers.click_helper(location) elif target == 'certificate does not have expected reasons remove all button': location = locations.CertificateExemptExposureReasons.Buttons.certificate_does_not_have_expected_reasons_remove_all helpers.click_helper(location) else: print(warn.INVALID_CLICK_TARGET, target)
def customer_exempt_exposure_reasons(target_name, **kwargs): target = target_name.lower() if target == 'customer reason in exposure zones input': location = locations.CustomerExemptExposureReasons.Inputs.customer_reason_in_exposure_zones helpers.input_field_click_or_select(location, **kwargs) elif target == 'customer has documented reasons input': location = locations.CustomerExemptExposureReasons.Inputs.customer_has_documented_reasons helpers.input_field_click_or_select(location, **kwargs) elif target == 'customer does not have documented reasons input': location = locations.CustomerExemptExposureReasons.Inputs.customer_does_not_have_documented_reasons helpers.input_field_click_or_select(location, **kwargs) elif target == 'customer has expected reasons input': location = locations.CustomerExemptExposureReasons.Inputs.customer_has_expected_reasons helpers.input_field_click_or_select(location, **kwargs) elif target == 'customer does not have expected reasons input': location = locations.CustomerExemptExposureReasons.Inputs.customer_does_not_have_expected_reasons helpers.input_field_click_or_select(location, **kwargs) elif target == 'reason modified date begin input': location = locations.CustomerExemptExposureReasons.Inputs.customer_tax_code_date_begin helpers.click_or_type(location, **kwargs) elif target == 'reason modified date end input': location = locations.CustomerExemptExposureReasons.Inputs.customer_tax_code_date_end helpers.click_or_type(location, **kwargs) elif target == 'reason modified date ago input': location = locations.CustomerExemptExposureReasons.Inputs.customer_tax_code_days_ago helpers.click_or_type(location, **kwargs) elif target == 'reason modified date to input': location = locations.CustomerExemptExposureReasons.Inputs.customer_tax_code_days_to helpers.click_or_type(location, **kwargs) elif target == 'customer reason in exposure zones select': location = locations.CustomerExemptExposureReasons.Selects.customer_reason_in_exposure_zones helpers.click_or_select(location, **kwargs) elif target == 'customer has documented reasons select': location = locations.CustomerExemptExposureReasons.Selects.customer_has_documented_reasons helpers.click_or_select(location, **kwargs) elif target == 'customer does not have documented reasons select': location = locations.CustomerExemptExposureReasons.Selects.customer_does_not_have_documented_reasons helpers.click_or_select(location, **kwargs) elif target == 'customer has expected reasons select': location = locations.CustomerExemptExposureReasons.Selects.customer_has_expected_reasons helpers.click_or_select(location, **kwargs) elif target == 'customer does not have expected reasons select': location = locations.CustomerExemptExposureReasons.Selects.customer_does_not_have_expected_reasons helpers.click_or_select(location, **kwargs) elif target == 'reason modified date select': location = locations.CustomerExemptExposureReasons.Selects.reason_modified_date helpers.click_or_select(location, **kwargs) elif target == 'customer reason in exposure zones add all button': helpers.click_helper(locations.CustomerExemptExposureReasons.Buttons. customer_reason_in_exposure_zones_add_all) elif target == 'customer reason in exposure zones remove all button': helpers.click_helper(locations.CustomerExemptExposureReasons.Buttons. customer_reason_in_exposure_zones_remove_all) elif target == 'customer has documented reasons add all button': helpers.click_helper(locations.CustomerExemptExposureReasons.Buttons. customer_has_documented_reasons_add_all) elif target == 'customer has documented reasons remove all button': helpers.click_helper(locations.CustomerExemptExposureReasons.Buttons. customer_has_documented_reasons_remove_all) elif target == 'customer does not have documented reasons add all button': helpers.click_helper(locations.CustomerExemptExposureReasons.Buttons. customer_does_not_have_documented_reasons_add_all) elif target == 'customer does not have documented reasons remove all button': helpers.click_helper( locations.CustomerExemptExposureReasons.Buttons. customer_does_not_have_documented_reasons_remove_all) elif target == 'customer has expected reasons add all button': helpers.click_helper(locations.CustomerExemptExposureReasons.Buttons. customer_has_expected_reasons_add_all) elif target == 'customer has expected reasons remove all button': helpers.click_helper(locations.CustomerExemptExposureReasons.Buttons. customer_has_expected_reasons_remove_all) elif target == 'customer does not have expected reasons add all button': helpers.click_helper(locations.CustomerExemptExposureReasons.Buttons. customer_does_not_have_expected_reasons_add_all) elif target == 'customer does not have expected reasons remove all button': helpers.click_helper( locations.CustomerExemptExposureReasons.Buttons. customer_does_not_have_expected_reasons_remove_all) else: print(warn.INVALID_CLICK_TARGET, target)
def customer_attributes_click(target_name, **kwargs): target = target_name.lower() if target == 'customer has attributes input': location = locations.CustomerAttributes.Inputs.customer_has helpers.input_field_click_or_select(location, **kwargs) elif target == 'customer does not have attributes input': location = locations.CustomerAttributes.Inputs.customer_does_not_have helpers.input_field_click_or_select(location, **kwargs) elif target == 'attribute added date start input': location = locations.CustomerAttributes.Inputs.customer_attributes_date_begin helpers.input_field_click_or_select(location, **kwargs) elif target == 'attribute added date end input': location = locations.CustomerAttributes.Inputs.customer_attributes_date_end helpers.input_field_click_or_select(location, **kwargs) elif target == 'attribute added date ago input': location = locations.CustomerAttributes.Inputs.customer_attributes_days_ago helpers.input_field_click_or_select(location, **kwargs) elif target == 'attribute added date to input': location = locations.CustomerAttributes.Inputs.customer_attributes_days_to helpers.input_field_click_or_select(location, **kwargs) elif target == 'customer has attributes select': location = locations.CustomerAttributes.Selects.customer_has helpers.click_or_select(location, **kwargs) elif target == 'customer does not have attributes select': location = locations.CustomerAttributes.Selects.customer_does_not_have helpers.click_or_select(location, **kwargs) elif target == 'attribute added date select': location = locations.CustomerAttributes.Selects.attribute_added_date helpers.click_or_select(location, **kwargs) elif target == 'customer has add all button': helpers.click_helper( locations.CustomerAttributes.Buttons.customer_has_add_all) elif target == 'customer has remove all button': helpers.click_helper( locations.CustomerAttributes.Buttons.customer_has_remove_all) elif target == 'customer does not have add all button': helpers.click_helper(locations.CustomerAttributes.Buttons. customer_does_not_have_add_all) elif target == 'customer does not have remove all button': helpers.click_helper(locations.CustomerAttributes.Buttons. customer_does_not_have_remove_all) else: print(warn.INVALID_CLICK_TARGET, target)