コード例 #1
0
ファイル: base_event.py プロジェクト: juicyJ/citybeat_online
 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]
コード例 #2
0
 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])
コード例 #3
0
 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])
コード例 #4
0
 def stone_button(self):
     locator = Locator(By.ID, 'r1Btn')
     return BaseElement(self.driver, locator=locator)
コード例 #5
0
 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])
コード例 #6
0
 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])
コード例 #7
0
 def fifth_listing(self):
     locator = (By.XPATH, "//div[starts-with(@id,'listing_')][4]")
     return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
コード例 #8
0
 def click_search(self):
     locator = (By.CSS_SELECTOR, 'button[data-testid="search-button"]')
     return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
コード例 #9
0
 def name_result(self):
     locator = Locator(By.XPATH, "//p[text()='3000'] /.. /span")
     return BaseElement(self.driver, locator=locator)
コード例 #10
0
 def name_input(self):
     locator = Locator(By.CSS_SELECTOR, "input#r3Input")
     return BaseElement(self.driver, locator=locator)
コード例 #11
0
 def stone_result(self):
     locator = Locator(By.CSS_SELECTOR, "div#passwordBanner > h4")
     return BaseElement(self.driver, locator=locator)
コード例 #12
0
 def secrets_button(self):
     locator = Locator(By.CSS_SELECTOR, 'button#r2Butn')
     return BaseElement(self.driver, locator=locator)
コード例 #13
0
 def secrets_input(self):
     locator = Locator(By.CSS_SELECTOR, 'input#r2Input')
     return BaseElement(self.driver, locator=locator)
コード例 #14
0
 def stone_button(self):
     locator = Locator(By.CSS_SELECTOR, 'button#r1Btn')
     return BaseElement(self.driver, locator=locator)
コード例 #15
0
 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])
コード例 #16
0
 def check_answer_button(self):
     locator = Locator(By.CSS_SELECTOR, 'button#checkButn')
     return BaseElement(self.driver, locator=locator)
コード例 #17
0
 def location_text(self):
     locator = (By.CSS_SELECTOR, 'input[id="header-location"]')
     return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
コード例 #18
0
 def result_banner(self):
     locator = Locator(By.CSS_SELECTOR, "div#trialCompleteBanner > h4")
     return BaseElement(self.driver, locator=locator)
コード例 #19
0
 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])
コード例 #20
0
 def email_input(self):
     locator = (By.CSS_SELECTOR, 'input#username')
     return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
コード例 #21
0
 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])
コード例 #22
0
 def password_input(self):
     locator = (By.CSS_SELECTOR, 'input#password')
     return BaseElement(driver=self.driver, by=locator[0], value=locator[1])
コード例 #23
0
 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])
コード例 #24
0
 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])
コード例 #25
0
ファイル: pom.py プロジェクト: see3dee/selenium-page-object
 def button1(self):
     locator = (By.ID, 'b1')
     return BaseElement(
         driver=self.driver,
         by=locator[0],
         value=locator[1])
コード例 #26
0
 def button1(self):
     locator = Locator(by=By.ID, value='b1')
     return BaseElement(driver=self.driver, locator=locator)