Skip to content

Instantly share code, notes, and snippets.

@hugs
Created February 13, 2009 23:01
Show Gist options
  • Select an option

  • Save hugs/64154 to your computer and use it in GitHub Desktop.

Select an option

Save hugs/64154 to your computer and use it in GitHub Desktop.
from selenium import selenium
from time import sleep
import unittest
class TestSauce(unittest.TestCase):
def setUp(self):
self.selenium = selenium("localhost", \
4444, "*chrome", "http://imvu.com/")
self.selenium.start()
self.selenium.set_speed(2000)
def test_imvu(self):
sel = self.selenium
sel.open("/")
sel.window_maximize()
sel.click("link=About Us")
sel.wait_for_page_to_load("10000")
sel.click("//div[@id='about_us']/ul/li[2]/a/em")
sel.wait_for_page_to_load("10000")
try:
self.failUnless(sel.is_text_present("Management Team"))
except AssertionError, e:
self.verificationErrors.append(str(e))
def tearDown(self):
self.selenium.stop()
if __name__ == "__main__":
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment