是否可以使用需要2FA的电子邮件来自动化测试用例?

时间:2018-10-10 08:25:23

标签: selenium automation

我正在自动化测试用例,后来我们公司使用2fa更改了电子邮件身份验证...现在,我正在探讨如何以自动化方式访问电子邮件。另外,据我所知,Robot框架在执行时确实会刷新缓存,这就是为什么我不能使用缓存的原因。我正在使用Robot-Selenium框架。

这是我的代码:

credentials = ServiceAccount(username=self.__username, 
      password=self.__password)
config = Configuration(server=self.__mailserver, credentials=credentials)
account = Account(primary_smtp_address=self.__smtp, config=config,
                          autodiscover=False, access_type=DELEGATE)
filtered_items = 
      account.inbox.all().order_by('datetime_received').filter( 
      sender__iexact=sender_email)

0 个答案:

没有答案