千家信息网

AttributeError: 'baiduPage' object has no attribute '_testMethodDoc'

发表于:2025-12-01 作者:千家信息网编辑
千家信息网最后更新 2025年12月01日,记录一次selenium自动化测试坑爹的过程:报错如下AttributeError: 'baiduPage' object has no attribute '_testMethodDoc'原因:在使
千家信息网最后更新 2025年12月01日AttributeError: 'baiduPage' object has no attribute '_testMethodDoc'

记录一次selenium自动化测试坑爹的过程:

报错如下

AttributeError: 'baiduPage' object has no attribute '_testMethodDoc'


原因:在使用工厂设计模式The factory pattern,做web端和app端自动化测试时,导入模块时同时导入了

from appium import webdriver

from selenium import webdriver

结果就出现了如上的报错信息,注销from appium import webdriver后运行正常,可是问题来了,如果要使用工厂设计模式把web和app测试结合在一起该如何搞呢?



还没搞懂……后续更新



0