示例#1
0
class TestPowerservicespowerSite(unittest.TestCase):

    @pytest.fixture(autouse=True)
    def classSetUp(self):
        self.sel = SeleniumDriver(self.driver)
        self.google=GooglePage(self.driver)
        self.ps=PowerSitePage(self.driver)
        self.cp=CartPage(self.driver)
        self.bd=BillingDetails(self.driver)


    def test_powersite_Purchase(self):
        self.google.loginWithGoogle("*****@*****.**","9066549823")
        sleep(1)
        self.ps.clickOnFreeTrialXpath()
        sleep(3)
        self.ps.clickOnViewCart()
        self.cp.clickOnProceedCheckOut()
        self.bd.purchasingPowersite()

    def tearDown(self):
        for method, error in self._outcome.errors:
            if error:

                self.sel.takeScreenShot(str(method))
示例#2
0
class TestPowerLyticsPurchase(unittest.TestCase):
    @pytest.fixture(autouse=True)
    def classSetUp(self, oneTimeSetUp):
        self.sel = SeleniumDriver(self.driver)
        self.gg = GooglePage(self.driver)
        self.ph = PowerHouseServices(self.driver)
        self.pl = PowerLytics(self.driver)
        self.cp = CartPage(self.driver)

    def test_Power_power_mail(self):
        self.gg.loginWithGoogle("*****@*****.**", "9066549823")
        sleep(2)
        self.ph.mouseOverOnPowerhouseService()
        self.ph.clickOnPowerLytics()
        self.pl.clickOnFreeLyticsaddTocart()
        sleep(3)
        self.pl.clickOnViewCartPowerLytics()
        self.cp.clickOnProceedCheckOut()
        self.pl.purchasePowerLyticsFree()

    def tearDown(self):
        for method, error in self._outcome.errors:
            if error:
                self.sel.takeScreenShot(str(method))
class TestWithGoogle(unittest.TestCase):
    @pytest.fixture(autouse=True)
    def classSetUp(self, oneTimeSetUp):
        self.sel = SeleniumDriver(self.driver)
        self.googleLogin = GooglePage(self.driver)
        self.result = TestStatus(self.driver)

    def test_google_login(self):
        status = self.googleLogin.loginWithGoogle("*****@*****.**",
                                                  "2357987")
        self.result.markFinal("test_google_login", status,
                              "Sucessfull login verification")

    def tearDown(self):
        for method, error in self._outcome.errors:
            if error:
                # self.driver.get_screenshot_as_file("screenshot" + self.id() + ".png")
                self.sel.takeScreenShot("Taking the screen shot for " +
                                        str(method))
 def classSetUp(self, oneTimeSetUp):
     self.sel = SeleniumDriver(self.driver)
     self.googleLogin = GooglePage(self.driver)
     self.result = TestStatus(self.driver)
示例#5
0
 def classSetUp(self, oneTimeSetUp):
     self.sel = SeleniumDriver(self.driver)
     self.gg = GooglePage(self.driver)
     self.ph = PowerHouseServices(self.driver)
     self.pl = PowerLytics(self.driver)
     self.cp = CartPage(self.driver)
示例#6
0
 def classSetUp(self):
     self.sel = SeleniumDriver(self.driver)
     self.google=GooglePage(self.driver)
     self.ps=PowerSitePage(self.driver)
     self.cp=CartPage(self.driver)
     self.bd=BillingDetails(self.driver)