当前位置:首页 > Python教程 > python技巧

Selenium+Python自动化测试学习问题总结笔记

1.问题描述:不能导入自定义类

  错误内容:This inspection detects names that should resolve but don‘t. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items

  截图:(count.py文件不能导入在相同路径下的pub.py的方法)

技术分享图片

  解决方法1:将导入部分写成:from WebTest.project.pub import add (将路径明确写入)

  解决方法2:进入:File—setting—Bulidout,Excution,Deployment—Console—Python Console 如下图操作

 技术分享图片

 之后右击项目,如下图操作

 技术分享图片

 

原文:https://www.cnblogs.com/yunfang/p/10676519.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐