为什么我收到消息跑0测试

时间:2018-09-05 13:46:28

标签: python-3.x selenium selenium-webdriver

我正在运行测试...


在0:00:00进行了0次测试

from selenium import webdriver
import unittest
import HtmlTestRunner
from selenium.webdriver.common.keys import Keys


class Login(unittest.TestCase):

def enviroNment(self):
    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_argument("--Person1")
    chrome_options.add_argument("--start-maximized")
    driver = webdriver.Chrome(chrome_options=chrome_options)
    driver.get('http://localhost.com/dashboard/user/login')

def login(self):
    self.driver.find_element_by_id('uemail').send_keys('xyz@gmail.com')
    self.driver.find_element_by_id('upwd').send_keys('1234567890')
    self.driver.find_element_by_id('upwd').send_keys(Keys.RETURN)

"""def test_method(self):
    self.environment()
    self.login()"""

def tearDown(self):
    self.driver.close()

if __name__ == "__main__":
    unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output='D:\automation\reports'))

0 个答案:

没有答案