Created
October 26, 2014 11:42
-
-
Save easonhan007/f19fc539896af00dca45 to your computer and use it in GitHub Desktop.
pyunit start point
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
import unittest | |
from selenium import webdriver | |
import time | |
class LoginCase(unittest.TestCase): | |
def setUp(self): #每个用例执行之前执行 | |
print 'before test' | |
def test_login(self): | |
print 'doing test now' | |
def by_id(self, the_id): | |
print 'find element by id' | |
def by_css(self, css): | |
print 'find element by css' | |
def tearDown(self): #每个用例执行之后 | |
print 'after every test' | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment