学习Python驱动的Selenium,在我的实践中,我不断得到以下错误。我被卡住了,需要一些指导
Traceback (most recent call last): File "test_login.py", line 14, in test_Login loginpage = homePage(self.driver) TypeError: 'module' object is not callable
这是我的密码
test_login.py
import unittest
import homePage
from selenium import webdriver
class Login(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.get("https://hub.docker.com/login/")
def test_Login(self):
loginpage = homePage(self.driver)
loginpage.login(email,password)
def tearDown(self):
self.driver.close()
if __name__ == '__main__': unittest.main()
^{pr2}$homePage.py
感谢任何帮助
我认为:
您的意思是实例化
^{pr2}$LoginPage
类:相关问题 更多 >
编程相关推荐