def shopping_cart_num_exist(self):
     try:
         driver.find_element_by_xpath(self.shopping_cart_num_xpath)
         return False
     except NoSuchElementException:
         return True
Beispiel #2
0
 def add_to_cart_from_item(self):
     el = driver.find_element_by_xpath(self.add_to_cart_button_xpath)
     el.click()
 def remove_from_cart_home_page(self, n):
     el = driver.find_element_by_xpath('//*[@class="inventory_item"][' +
                                       str(n) + ']//button')
     el.click()
Beispiel #4
0
 def back_to_home_page(self):
     el = driver.find_element_by_xpath(self.back_button_xpath)
     el.click()
 def message_user_locked_out_exist(self):
     return driver.find_element_by_xpath('//*[text()="' + self.user_locked_out_text + '"]') != None
 def message_credentials_not_match_exist(self):
     return driver.find_element_by_xpath('//*[text()="' + self.credentials_not_match_text + '"]') != None
Beispiel #7
0
 def finish_button_click(self):
     el = driver.find_element_by_xpath(self.checkout_button_xpath)
     el.click()
Beispiel #8
0
 def continue_button_click(self):
     el = driver.find_element_by_xpath(self.continue_button_xpath)
     el.click()