Skip to content

Instantly share code, notes, and snippets.

@easonhan007
Created October 26, 2014 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save easonhan007/f19fc539896af00dca45 to your computer and use it in GitHub Desktop.
Save easonhan007/f19fc539896af00dca45 to your computer and use it in GitHub Desktop.
pyunit start point
#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