Пример #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))
Пример #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))
Пример #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)
Пример #4
0
 def exists(self):
     browser = get_browser(merchant=self.merchant_name)
     return len(find_by_text(
         browser,
         "Available Scheduled Times",
     )) > 0
Пример #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
Пример #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
Пример #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)
Пример #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)
Пример #9
0
 def run(self):
     find_by_text(
         get_browser(merchant=MERCHANT_NAME),
         "Delivery times",
     )[0].click()
     sleep(8)