自動化テスト:python+selenium生成組織機構コード証


orgList = ['MA1WYPU7-X', 'MA3828DP-X', 'MA72057F-2', 'MA31Y86J-4', 'MA31Y5GQ-7', 'MA45JGJA-9', 'MA0CKGXH-X', 'MA2RXWPR-2', 'MA2RXXFW-2', 'MA1WYP3L-2', 'MA45KE3B-5', 'MA5F8J6T-0', 'MA2CDF71-6', 'MA5T5JRM-3', 'MA06DX68-7', 'MA495553-X', 'MA1WYQFW-1', 'MA5BUQAH-3', 'MA5BUPKT-2', 'MA5BUQEL-1', 'MA5BUPP5-8', 'MA01DRR0-4', 'MA5T5JLM-5', 'MA5BLYA3-1', 'MA1K1CH6-2', 'MA2DE2G9-X', 'MA2CJ1NX-4', 'MA45JFFH-8', 'MA1WYM33-7', 'MA1WYKHP-0', 'MA1WYK36-6', 'MA4PR4DH-7', 'MA2RXTQ8-5', 'MA4PR3H2-7', 'MA4PR1MW-9', 'MA4PR2LT-0', 'MA4PR2E4-1', 'MA4954JX-1', 'MA31Y3DA-1', 'MA45JF0F-6', 'MA0CJ7A9-8', 'MA01DR3P-6', 'MA2RXR53-5', 'MA2RXRED-4', 'MA4954AL-6', 'MA2RXU0X-7', 'MA1B7QHF-9', 'MA5NB92X-4', 'MA5NB2YB-9', 'MA0XYB00-2', 'MA0XYL7F-7', 'MA2RXP6E-6', 'MA3M7NNX-X', 'MA01DQKD-3', 'MA1HPJ0H-1', 'MA3M7MCL-9', 'MA31XYWU-5', 'MA2E025W-2', 'MA3M7N13-4', 'MA3M7MN8-2', 'MA6H55CE-5', 'MA45J6JT-7', 'MA7744ET-5', 'MA31Y194-1', 'MA2CJ0YN-X', 'MA1WYF73-3', 'MA4PR0R2-2', 'MA31Y0QG-5', 'MA6N9TE1-4', 'MA6NAK30-7', 'MA74GWD4-3', 'MA4PQY7X-6', 'MA3M7MKH-7', 'MA522GX0-2', 'MA31XXLW-9', 'MA4PR069-6', 'MA4PR0DX-7', 'MA495475-6', 'MA49544D-2', 'MA45J5D7-6', 'MA45J5EX-5', 'MA2RXNUH-8', 'MA45J668-2', 'MA45J9AK-4', 'MA2RXN9K-9', 'MA2CDCL8-4', 'MA2CQPJ1-0', 'MA1JAYEJ-8', 'MA1WYEJ4-5', 'MA01DQ01-8', 'MA5BLU67-8', 'MA5BLWT7-X', 'MA01DQ93-1', 'MA6H55EJ-9', 'MA01DQ2U-8', 'MA2RXHTY-4', 'MA1K1BQK-1', 'MA1JAY8J-X', 'MA1FPBJN-8', 'MA31XTY6-8', 'MA7744A7-X', 'MA2CJ03G-5', 'MA3M7ACY-2', 'MA3M7CG3-X', 'MA45J26J-1', 'MA3M7C23-0', 'MA3M7BE1-8', 'MA1WY56P-X', 'MA4L0AKG-9', 'MA4953FL-5', 'MA1B7N7N-2', 'MA45J2QC-1', 'MA5NB4M6-7', 'MA1WY880-6', 'MA31XTBP-7', 'MA31XT3P-6', 'MA0CJQ19-2', 'MA6013AW-7', 'MA2CDCXC-3', 'MA5T5H18-8', 'MA2RXJPG-7', 'MA0CJB7U-1', 'MA01DP7M-1', 'MA01DP0B-7', 'MA5BLU0Q-5', 'MA5BLUGP-9', 'MA5BLTKH-6', 'MA5BE05Y-2', 'MA01DP5H-8', 'MA0CJ2L7-8', 'MA06DTB9-6', 'MA1HPHD4-2', 'MA5227M8-3', 'MA3M78LP-0', 'MA31XMEG-3', 'MA381XAP-3', 'MA0PYD68-4', 'MA5NAUJP-9', 'MA45J0KF-2', 'MA45J17W-1', 'MA5NAWWX-2', 'MA3M74DK-8', 'MA522318-9', 'MA3M745T-0', 'MA6NAC9K-7', 'MA31XNEN-3', 'MA2DDYR4-0', 'MA2RXEXM-3', 'MA5223R8-4', 'MA5T5G6B-1', 'MA5227JN-7', 'MA5224FD-1', 'MA5224NP-0', 'MA5NAWL4-5', 'MA2CDBH0-0', 'MA5227K3-X', 'MA31XQMG-5', 'MA5224FY-3', 'MA522212-7', 'MA5221T7-3', 'MA5223A7-8', 'MA5F8A26-2', 'MA1WY0W2-3', 'MA5F88DM-8', 'MA5T5G9P-5', 'MA6H5139-6', 'MA0XYBX1-0', 'MA2RXDJG-2', 'MA3M76CX-3', 'MA01DNKH-8', 'MA5BLRW5-9', 'MA5BLREB-3', 'MA01DNPU-6', 'MA2RXG1D-1', 'MA2RXGDY-X', 'MA4L09PW-9', 'MA1GMUHC-1', 'MA1JMKDB-3', 'MA1JMKDK-7', 'MA3M6XEH-3', 'MA3M6XXD-1', 'MA0CJRN8-7', 'MA3M6YXW-X', 'MA1WXNDF-6', 'MA1WXPYU-8', 'MA2RXC3W-9', 'MA4PQKXL-5', 'MA521U7L-1', 'MA3M701D-3', 'MA4953XU-3', 'MA1B7JB1-7', 'MA15BG5W-0', 'MA15BF3H-2', 'MA2RXC37-4', 'MA4PQM7Q-6', 'MA5BLPKF-9', 'MA2RXCCC-2', 'MA45HM9B-9', 'MA45HYW4-0', 'MA0CJMHY-8', 'MA3M6WJE-8', 'MA521X76-7', 'MA0XY8F5-0', 'MA0XY9QW-4', 'MA5T5FLR-5', 'MA5NAXXF-4', 'MA6H551W-2', 'MA6H55JG-6', 'MA5BLQ29-8', 'MA0CJF27-2', 'MA5BLPQN-2', 'MA5BLP4T-1', 'MA5BLPKN-4', 'MA0CJMEW-2', 'MA2RX81W-5', 'MA1G5JNM-9', 'MA1HPGXJ-X', 'MA1HPH0B-7', 'MA6W0UP5-9', 'MA3M6TK5-2', 'MA3M6RMM-9', 'MA3M6NMU-3', 'MA31XDXJ-4', 'MA31XHA0-3', 'MA45HGBP-X', 'MA1WXFX2-5', 'MA1WXKD3-X', 'MA2RX9E9-2', 'MA2RX97W-6', 'MA31XF5A-8', 'MA0CJ87N-6', 'MA0XY5Y0-2', 'MA495210-1', 'MA2DDX57-2', 'MA15BEEQ-3', 'MA1WXK5N-2', 'MA6NANNU-8', 'MA2B4Y42-7', 'MA4PQGWK-X', 'MA4951LY-4', 'MA2RX7RR-7', 'MA2RX8BA-9', 'MA31XE66-9', 'MA45HGC2-8', 'MA45HL70-3', 'MA2CD9FF-5', 'MA521LRW-4', 'MA521N55-9', 'MA521MNU-5', 'MA3M6Q4F-4', 'MA2CDADP-7', 'MA2CDAMQ-2', 'MA0CHWJA-0', 'MA0XY865-3', 'MA01DM49-8', 'MA01DLH2-0', 'MA01DLQH-0', 'MA01DLT7-8', 'MA5BLNE1-0', 'MA5BDW0R-5', 'MA5BE00N-0', 'MA5BLNB2-X', 'MA01DM7Y-1', 'MA01DLNY-0', 'MA06DPE5-1', 'MA2RX6EH-X', 'MA5NAL4Q-7', 'MA521KPQ-X', 'MA45HC71-7', 'MA0CJR9N-0', 'MA5T5E98-0', 'MA6H4NHE-0', 'MA6H4RQ0-4', 'MA0XY4CB-X', 'MA2CD8FJ-5', 'MA3M6CJ7-6', 'MA0CHT40-5', 'MA1WXD96-X', 'MA5BDWTR-X', 'MA5BDX0D-3', 'MA01DL37-2', 'MA0XY3JC-X', 'MA45HCFK-3', 'MA2RXX0L-7', 'MA1HPJLC-4', 'MA31Y63M-4', 'MA5T5JEF-3', 'MA31Y7TP-7', 'MA31Y8B1-9', 'MA1WYUW9-2', 'MA1WYPC4-0', 'MA31Y701-6', 'MA1WYRPC-4', 'MA71Y0TW-2', 'MA74U5TW-7', 'MA2BB0UL-3', 'MA4PR7FC-7', 'MA4954W6-3', 'MA45JK92-0', 'MA5NBDU5-4']
    def UnCreditCode(self):
        code = CreditIdentifier()
        zdLen = len(list(sorted(area_dict.keys())))
        rad = int(random.randrange(0, zdLen, 1))
        area_code = int(list(sorted(area_dict.keys()))[rad])
        day = (time.strftime("%d"))
        ageArg = 55 - int(day)
        zzjgdm = self.getOrgJY()  # 
        para = '91' + self.getIDCard()[:6] + zzjgdm[:8] + zzjgdm[-1:] + self.getRandNumber(1)
        self.my_print_info(zzjgdm)

        # cerCode = code.getSocialCreditCode(para)
        cerCode = para
        self.my_print_info(cerCode)
        return cerCode
    def getOrgJY(self):
        rad = random.randrange(len(orgList))

        code= orgList[rad]

        return code