def getGeoLocationCenter(self): lat = 0 lon = 0 n = len(self._event[self._element_type]) for element in self._event[self._element_type]: element = BaseElement(element) loc = element.getLocations() lat += loc[0] lon += loc[1] return [lat / n, lon / n]
def available_slots(self): locator = (By.CSS_SELECTOR, 'button[class="button button-secondary small available-slot--button"]') return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def no_slot_message(self): locator = (By.CSS_SELECTOR, 'p[class="sc-AxiKw sc-oVpqz jydMzo no-slot-msg--delivery"]') return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def stone_button(self): locator = Locator(By.ID, 'r1Btn') return BaseElement(self.driver, locator=locator)
def accept_cookies(self): locator = ( By.CSS_SELECTOR, 'button[class="ui-button-primary ui-cookie-accept-all-medium-large"]' ) return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def view_agent_props_btn(self): locator = (By.CSS_SELECTOR, "a[data-testid='agent-properties-link']") return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def fifth_listing(self): locator = (By.XPATH, "//div[starts-with(@id,'listing_')][4]") return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def click_search(self): locator = (By.CSS_SELECTOR, 'button[data-testid="search-button"]') return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def name_result(self): locator = Locator(By.XPATH, "//p[text()='3000'] /.. /span") return BaseElement(self.driver, locator=locator)
def name_input(self): locator = Locator(By.CSS_SELECTOR, "input#r3Input") return BaseElement(self.driver, locator=locator)
def stone_result(self): locator = Locator(By.CSS_SELECTOR, "div#passwordBanner > h4") return BaseElement(self.driver, locator=locator)
def secrets_button(self): locator = Locator(By.CSS_SELECTOR, 'button#r2Butn') return BaseElement(self.driver, locator=locator)
def secrets_input(self): locator = Locator(By.CSS_SELECTOR, 'input#r2Input') return BaseElement(self.driver, locator=locator)
def stone_button(self): locator = Locator(By.CSS_SELECTOR, 'button#r1Btn') return BaseElement(self.driver, locator=locator)
def home_week_tab(self): locator = (By.CSS_SELECTOR, 'a[class="slot-selector--week-tabheader-link"]') return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def check_answer_button(self): locator = Locator(By.CSS_SELECTOR, 'button#checkButn') return BaseElement(self.driver, locator=locator)
def location_text(self): locator = (By.CSS_SELECTOR, 'input[id="header-location"]') return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def result_banner(self): locator = Locator(By.CSS_SELECTOR, "div#trialCompleteBanner > h4") return BaseElement(self.driver, locator=locator)
def drop_down_sorting(self): locator = (By.CSS_SELECTOR, 'select[id="sort-order-dropdown"]') return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def email_input(self): locator = (By.CSS_SELECTOR, 'input#username') return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def listing_agent_name(self): locator = (By.XPATH, "//h3[@class='css-e13akx-Heading3-AgentHeading e11937k16']") return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def password_input(self): locator = (By.CSS_SELECTOR, 'input#password') return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def agent_properties_listing(self): locator = (By.XPATH, "//a[starts-with(@href,'/find-agents/company/')]") return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def sign_in_button(self): locator = (By.CSS_SELECTOR, 'button[class="ui-component__button"]') return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
def button1(self): locator = (By.ID, 'b1') return BaseElement( driver=self.driver, by=locator[0], value=locator[1])
def button1(self): locator = Locator(by=By.ID, value='b1') return BaseElement(driver=self.driver, locator=locator)