Browse Source

updated tests

changes/49/376949/1
Corey Goldberg 9 years ago
parent
commit
94a226e00e
1 changed files with 11 additions and 5 deletions
  1. +11
    -5
      xvfbwrapper/test_xvfb_selenium.py

+ 11
- 5
xvfbwrapper/test_xvfb_selenium.py View File

@ -1,19 +1,25 @@
#!/usr/bin/env python
from selenium import webdriver
from xvfbwrapper import Xvfb
import unittest
from selenium import webdriver
class TestUbuntuHomepage(unittest.TestCase):
class TestHomepages(unittest.TestCase):
def setUp(self):
self.vdisplay = Xvfb(width=1280, height=720)
self.vdisplay.start()
self.browser = webdriver.Firefox()
def testTitle(self):
def testUbuntuHomepage(self):
self.browser.get('http://www.ubuntu.com')
self.assertIn('Ubuntu', self.browser.title)
def testGoogleHomepage(self):
self.browser.get('http://www.google.com')
self.assertIn('Google', self.browser.title)
def tearDown(self):
self.browser.quit()
self.vdisplay.stop()


Loading…
Cancel
Save