selenium获取随机邮箱账号和用户名的方法

玩技站长
玩技站长
管理员, Keymaster
11142
文章
0
粉丝
Auto测试评论1,939字数 75阅读0分15秒阅读模式
selenium获取随机邮箱账号和用户名的方法插图
Selenium3自动化测试实战――基于Python语言(博文视点出品)

1、用到的模块:random。

2、引入函数 import random。文章源自玩技e族-https://www.playezu.com/22562.html

3、引入join函数格式化随机生成的数据。文章源自玩技e族-https://www.playezu.com/22562.html

  1. for email in range(5):
  2.           user_email = ''.join(random.sample('123456789abcdefg',5)) +"@163.com"
  3.           print(user_email)

4、用户名同理生成即可。文章源自玩技e族-https://www.playezu.com/22562.html 文章源自玩技e族-https://www.playezu.com/22562.html

 最后更新:2024-11-7
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证