在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'))