Example #1
0
    def get_product_info(self, index):
        name = self.get_text(ProductsPageLocators.LABEL_PRODUCT_NAME(index))
        desc = self.get_text(ProductsPageLocators.LABEL_PRODUCT_DESC(index))
        price = self.get_text(ProductsPageLocators.LABEL_PRODUCT_PRICE(index))

        product = Product(name, desc, price)
        print(product)
        return product
Example #2
0
 def does_remove_button_exist(self, index):
     return self.is_visible(ProductsPageLocators.BUTTON_REMOVE(index))
Example #3
0
 def remove_product_from_card(self, index):
     self.click(ProductsPageLocators.BUTTON_REMOVE(index))
Example #4
0
 def does_add_button_exist(self, index):
     return self.is_visible(ProductsPageLocators.BUTTON_ADD_TO_CART(index))
Example #5
0
 def add_product_to_card(self, index):
     self.click(ProductsPageLocators.BUTTON_ADD_TO_CART(index))
Example #6
0
 def click_add_to_cart_button(self, index):
     self.click(ProductsPageLocators.BUTTON_ADD_TO_CART(index))
Example #7
0
 def click_remove_button(self, index):
     self.click(ProductsPageLocators.BUTTON_REMOVE(index))