import seismograph from seismograph.ext import selenium suite = selenium.Suite(__name__) @suite.register def my_first_test(case): case.assertion.equal(1, 1) if __name__ == '__main__': seismograph.main()
def delete(self): WebDriverWait(self.driver, 30, 0.1).until( lambda d: d.find_element_by_xpath(self.LAST_POST)).click() WebDriverWait(self.driver, 30, 0.1).until( lambda d: d.find_element_by_xpath(self.FALLING_MENU)).click() WebDriverWait(self.driver, 30, 0.1).until( lambda d: d.find_element_by_xpath(self.DELETE_POST)).click() WebDriverWait(self.driver, 30, 0.1).until( lambda d: d.find_element_by_xpath(self.TEXT_POST_DELETED)) self.driver.find_element_by_xpath(self.ICO_X).click() suite = selenium.Suite(__name__, require=['selenium']) @suite.register class CreationPostTest(BaseCase): group_page = GroupPage text = str def teardown(self): last_post = self.group_page.get_last_post last_post.delete() self.group_page.refresh_page() last_post_text = last_post.get_last_post_text() self.assertion.not_equal(self.text, last_post_text) self.driver.quit()