Esempio n. 1
0
 def exists(self):
     browser = get_browser(merchant=self.merchant_name)
     return ((len(find_by_text(
         browser,
         "Info",
     )) > 0)
             & (len(find_by_text(
                 browser,
                 "Delivery times",
             )) > 0)
             & (len(find_by_text(
                 browser,
                 "Pickup times",
             )) > 0))
Esempio n. 2
0
 def detect_delivery_times(self):
     header = find_by_text(
         get_browser(merchant=MERCHANT_NAME),
         "Available Scheduled Times",
     )[0]
     section = get_parent(get_parent(header))
     return pd.DataFrame(self.parse_delivery_times(section.text))
Esempio n. 3
0
 def run(self):
     buttons = find_by_text(
         get_browser(merchant=MERCHANT_NAME),
         "Got it, Thanks",
     )
     if len(buttons) > 0:
         buttons[0].click()
         sleep(2)
Esempio n. 4
0
 def exists(self):
     browser = get_browser(merchant=self.merchant_name)
     return len(find_by_text(
         browser,
         "Available Scheduled Times",
     )) > 0
Esempio n. 5
0
 def exists(self):
     browser = get_browser(merchant=self.merchant_name)
     # The trial prompt is not displayed
     return len(find_by_text(browser, "Got it, Thanks")) == 0
Esempio n. 6
0
 def exists(self):
     browser = get_browser(merchant=self.merchant_name)
     # A log out button exists
     return len(find_by_text(browser, "Log Out")) > 0
Esempio n. 7
0
 def exists(self):
     browser = get_browser(merchant=self.merchant_name)
     return (len(find_by_text(
         browser,
         "Welcome back",
     )) > 0 and len(find_by_text(browser, "Log in")) > 0)
Esempio n. 8
0
 def exists(self):
     browser = get_browser(merchant=self.merchant_name)
     return (len(find_by_text(
         browser,
         "Already have an account?",
     )) > 0 and len(find_by_text(browser, "Log in")) > 0)
Esempio n. 9
0
 def run(self):
     find_by_text(
         get_browser(merchant=MERCHANT_NAME),
         "Delivery times",
     )[0].click()
     sleep(8)