Beispiel #1
0
class TestConditionals(StaticLiveServerTestCase):
    testname = 'TestConditionals'

    @classmethod
    def setUp(self):
        self.browser = EggheadSeleniumBrowser()
        self.driver = self.browser.getDriver()

    @classmethod
    def tearDown(self):
        self.driver.quit()

    def test_HomePage(self):
        self.driver.maximize_window()
        time.sleep(1)
        self.driver.get(self.live_server_url)
        time.sleep(3)
        self.assertEqual(self.driver.title,
                         'This is the home page for Egghead Project.')

        dashboard_menu = self.driver.find_element_by_xpath(
            "//*[@id='navbar']/ul[1]/li[2]")
        dashboard_menu.click()
        time.sleep(3)

        home_menu = self.driver.find_element_by_xpath(
            "/html/body/nav/div/div[1]/a")
        home_menu.click()
        time.sleep(3)

        robots_menu = self.driver.find_element_by_xpath(
            "//*[@id='navbar']/ul[1]/li[3]/a")
        robots_menu.click()
        time.sleep(3)

        strategies_menu = self.driver.find_element_by_xpath(
            "//*[@id='navbar']/ul[1]/li[4]/a")
        strategies_menu.click()
        time.sleep(3)

        create_strategy_menu = self.driver.find_element_by_xpath(
            "//*[@id='navbar']/ul[2]/li[1]/a")
        create_strategy_menu.click()
        time.sleep(3)

        create_robot_menu = self.driver.find_element_by_xpath(
            "//*[@id='navbar']/ul[2]/li[2]/a")
        create_robot_menu.click()
        time.sleep(3)
Beispiel #2
0
class TestDataMigrationComponent(StaticLiveServerTestCase):
    testname = 'TestDataMigrationComponent'

    @classmethod
    def setUp(self):
        self.browser = EggheadSeleniumBrowser()
        self.driver = self.browser.getDriver()

    @classmethod
    def tearDown(self):
        self.driver.quit()

    def test_HomePage(self):
        self.driver.maximize_window()
        time.sleep(1)
Beispiel #3
0
class TestOperaBrowser(StaticLiveServerTestCase):
    testname = 'TestOperaBrowser'

    @classmethod
    def setUp(self):
        self.browser = EggheadSeleniumBrowser(browser_type='opera')
        self.driver = self.browser.getDriver()

    @classmethod
    def tearDown(self):
        self.driver.quit()

    def test_HomePage(self):
        self.driver.maximize_window()
        time.sleep(1)
        self.driver.get(self.live_server_url)
        time.sleep(3)
        self.assertEqual(self.driver.title,
                         'This is the home page for Egghead Project.')