一、准备YAML文件编写数据(同级对齐)
-
user: 142452536423456782345
password: WDEqq1233
-
user: 4363836637
password: 1
-
user: HHH436383
password: 13423423
-
user: 436383SDWFWEFWsfwfe
password: 13423423
二、编写读取YAML的代码文件
import yaml
def read_yaml():
with open('y01.yml', encoding='utf-8', mode='r') as f:
value = yaml.load(stream=f, Loader=yaml.FullLoader)
print(value)
return value
if __name__ == '__main__':
read_yaml()
三、调用读取文件,编写用例
from selenium import w