首页 > 编程语言 >selenium python框架之获取email的参数

selenium python框架之获取email的参数

时间:2022-12-13 10:08:05浏览次数:52  
标签:__ python parameter self selenium path os email


 

# -*- coding:utf-8 -*-
# @Time : 2019-10-21
# @Author : carl-dj

import os
import yaml

class GetEmailParameter(object):

def __init__(self):
cur_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
self.email_path = os.path.join(os.path.join(cur_path, 'config'), 'email.yaml')
if not os.path.exists(self.email_path):os.mkdir(self.email_path)


def email_parameter(self):
"""获取email的配置信息"""
with open(self.email_path, 'r', encoding='utf-8') as f:
parameter = yaml.load(f)
return parameter

标签:__,python,parameter,self,selenium,path,os,email
From: https://blog.51cto.com/u_15910936/5932493

相关文章