from Po.Home import * class PageSignin(PageHome): box_user = [By.XPATH, '//input[@type="text" and @id="user"]'] box_pass = [By.XPATH, '//input[@type="password" and @id="pw"]'] box_persist = [By.XPATH, '//input[@type="checkbox" and @id="persist"]'] btn_submit = [By.XPATH, '//button[@type="submit"]'] def open(self): self.home() self.click_signin() return self def input_user(self, value): return self.driver.input(self.driver.find_element_by(self.box_user), value) def input_pass(self, value): return self.driver.input(self.driver.find_element_by(self.box_pass), value) def click_persist(self): return self.driver.click(self.driver.find_element_by(self.box_persist)) def click_submit(self): return self.driver.click(self.driver.find_element_by(self.btn_submit))