def test_01_login_link(self): print "\n" + str(gformz_test_cases(1)) #Here the Assignment of the MainPage is done. page = gfpages.LogInPage(self.driver) #self.assertTrue(page.click_Login_link()) loginpage = page.login_Link() self.driver.implicitly_wait(10) self.assertIn("accounts.goformz.com", loginpage.get_url()) login_url = self.driver.current_url
def test_01_sign_in_button(self): print "\n" + str(gformz_test_cases(2)) page = gfpages.LogInPage(self.driver) loginPage = page.login_Link() signinpage = gfpages.SignInPage(self.driver) self.driver.implicitly_wait(10) #user logs in with the user name and password signinpage.login() self.assertIn("app.goformz.com", signinpage.get_url()) signed_url = self.driver.current_url print "Logged In Page :" + signed_url
def test_01_click_Templates(self): print "\n" + str(gformz_test_cases(3)) page = gfpages.LogInPage(self.driver) loginPage = page.login_Link() signinpage = gfpages.SignInPage(self.driver) self.driver.implicitly_wait(10) signinpage.login() signedpage = gfpages.SignedPage(self.driver) templatelink = signedpage.click_Templates() self.assertIn("#Template", signedpage.get_url()) template_url = self.driver.current_url print "Dashboard Page : " + template_url
def test_03_load_Sample_Work_Order_Image(self): print "\n" + str(gformz_test_cases(5)) page = gfpages.LogInPage(self.driver) loginPage = page.login_Link() signinpage = gfpages.SignInPage(self.driver) self.driver.implicitly_wait(10) signinpage.login() signedpage = gfpages.SignedPage(self.driver) templatelink = signedpage.click_Templates() signedpage = gfpages.SignedPage(self.driver) signedpage.click_Sample_Work_Order() swo_img_load = signedpage.load_Sample_Work_Order_Image() self.assertIn("/#Template/edit?", signedpage.get_url())
def test_04_hover_More_Button(self): print "\n" + str(gformz_test_cases(6)) page = gfpages.LogInPage(self.driver) loginPage = page.login_Link() signinpage = gfpages.SignInPage(self.driver) self.driver.implicitly_wait(10) signinpage.login() signedpage = gfpages.SignedPage(self.driver) templatelink = signedpage.click_Templates() signedpage = gfpages.SignedPage(self.driver) signedpage.click_Sample_Work_Order() swo_img_load = signedpage.load_Sample_Work_Order_Image() hovermenu_button = signedpage.hover_More_Button() self.assertEqual('More', hovermenu_button.text)
def test_02_click_Sample_Work_Order(self): print "\n" + str(gformz_test_cases(4)) page = gfpages.LogInPage(self.driver) loginPage = page.login_Link() signinpage = gfpages.SignInPage(self.driver) self.driver.implicitly_wait(10) signinpage.login() signedpage = gfpages.SignedPage(self.driver) templatelink = signedpage.click_Templates() signedpage = gfpages.SignedPage(self.driver) signedpage.click_Sample_Work_Order() self.assertIn("/#Template/edit?", signedpage.get_url()) saveresult = self.driver.current_url print "Template Page :" + saveresult
def test_01_load_New_Work_Order_page(self): print "\n" + str(gformz_test_cases(7)) page = gfpages.LogInPage(self.driver) loginPage = page.login_Link() signinpage = gfpages.SignInPage(self.driver) self.driver.implicitly_wait(10) signinpage.login() signedpage = gfpages.SignedPage(self.driver) templatelink = signedpage.click_Templates() signedpage = gfpages.SignedPage(self.driver) signedpage.click_Sample_Work_Order() swo_img_load = signedpage.load_Sample_Work_Order_Image() signedpage_url = self.driver.current_url print "Sample Work Order Page : " + signedpage_url print " " #Round about way of getting the editor page since my click has problem with Chrome Browser. newworkorderpage_url = signedpage_url.replace('/#Template/edit?', '/editor#?f') print "NewWorkOrder Page :" + newworkorderpage_url newworkorderpage_url = self.driver.get(newworkorderpage_url) self.driver.implicitly_wait(10) self.assertIn("editor#?f", self.driver.current_url)
def test_01_main_page_load(self): print "\n" + str(gformz_test_cases(0)) page = gfpages.MainPage(self.driver) self.assertTrue(page.page_loaded())