def loginSetup(request): hp = HomePage(request.cls.driver) hp.goTologinPage() sp = SignUpPage(request.cls.driver) sp.login("*****@*****.**", "MithunaAmazon@123") yield hp.logout() print("Logout Successful")
def searchProd(request): hp = HomePage(request.cls.driver) plp = ProductListPage(request.cls.driver) prodname = hp.getDataFromJsonFile("ReadProductName.json", "bang") hp.search_product(prodname) yield assert prodname in plp.check_search_box(), "Search not working" print("Searchbox validated")
def classSetup(self, oneTimeSetUp): self.hp = HomePage(self.driver) self.lp = LoginPage(self.driver) self.pdp = ProductDetailsPage(self.driver) self.sp = ShoppingCartPage(self.driver) self.cp = CartPage(self.driver) self.dap = DeliveryAddressPage(self.driver) self.sop = ShippingOptionPage(self.driver) self.pp = PaymentPage(self.driver)
def search(request): key = "alexa" hp = HomePage(request.cls.driver) alp = AlexaListingPage(request.cls.driver) hp.searchProduct(key) yield print("Searching validated") assert key in alp.verifyResultKeyName( ), "Result products are not matched with the search key" print("Result products are matched with the search key")
def classSetup(self, oneTimeSetUp): self.hp = HomePage(self.driver) self.plp = ProductListPage(self.driver) self.pdp = PDP_Page(self.driver) self.cartpage = CartPage(self.driver) self.sign_up = SignUpPage(self.driver) self.address = DeliveryAddressPage(self.driver) self.shipment = ShipmentPage(self.driver) self.payment = PaymentMethodPage(self.driver) self.order = PlaceOrderPage(self.driver)
def loginLogout(request): hp = HomePage(request.cls.driver) lp = LoginPage(request.cls.driver) credentials = hp.fetchJSONData('loginCredential.json') username = credentials.get('username') password = credentials.get('password') hp.goToLogin() lp.loginAmazon(username, password) print("Successfully login") yield hp.logout() print("Successfully logout")
def classSetup(self, oneTimeSetUp): self.hp = HomePage(self.driver) self.plp = ProductListPage(self.driver)
def classSetup(self, oneTimeSetUp): self.hp = HomePage(self.driver) self.plp = ProductListPage(self.driver) self.pdp = PDP_Page(self.driver) self.cartpage = CartPage(self.driver)
def screenshot(request): hp = HomePage(request.cls.driver) # SeleniumDriver(request.cls.driver).takeScreenshot() yield SeleniumDriver(request.cls.driver).takeScreenshot()
def classSetup(self, oneTimeSetUp): self.hp = HomePage(self.driver) self.mlp = MobilesAccessoriesListingPage(self.driver)
def classSetup(self, oneTimeSetUp): self.hp = HomePage(self.driver) self.wlp = WomenWesternWearListingPage(self.driver) self.wwlp = WinterWearListingPage(self.driver) self.pdp = ProductDetailsPage(self.driver)
def classSetup(self, oneTimeSetUp, loginLogout): self.hp = HomePage(self.driver)
def classSetup(self, oneTimeSetUp): self.hp = HomePage(self.driver) self.lp = LoginPage(self.driver) self.pdp = ProductDetailsPage(self.driver) self.sp = ShoppingCartPage(self.driver) self.cp = CartPage(self.driver)
def classSetup(self, oneTimeSetUp): self.hp = HomePage(self.driver) self.pdp = ProductDetailsPage(self.driver)
def classSetup(self, oneTimeSetUp): self.hp = HomePage(self.driver) self.alp = AlexaListingPage(self.driver)
def classSetup(self, oneTimeSetUp, loginSetup): self.hp = HomePage(self.driver) print("Logging in")
def classSetup(self, oneTimeSetUp): self.hp = HomePage(self.driver)