def __init__(self): super().__init__(By.XPATH, "/html/body/div[1]") self.usernameTextBox = elementWarpper( By.XPATH, "//*[@id='msw-js-user-login-tab']/form/div[2]/input", 10) self.passwordTextBox = elementWarpper( By.XPATH, "//*[@id='msw-js-user-login-tab']/form/div[3]/input", 10) self.loginButton = elementWarpper(By.XPATH, "//*[@id='msw-js-login']", 10)
def goToStore(self): StoreTab = elementWarpper( By.XPATH, "//*[@id='msw-js-primaryBurgerContainer']/div[1]/div/div/div[7]", 10) StoreTab.click() return Features()
def goToLiveData(self): LiveDataTab = elementWarpper( By.XPATH, "//*[@id='msw-js-primaryBurgerContainer']/div[1]/div/div/div[6]", 10) LiveDataTab.click() return LiveData()
def goToPhotos(self): PhotosTab = elementWarpper( By.XPATH, "//*[@id='msw-js-primaryBurgerContainer']/div[1]/div/div/div[5]", 10) PhotosTab.click() return Features()
def goToCharts(self): ChartsTab = elementWarpper( By.XPATH, "//*[@id='msw-js-primaryBurgerContainer']/div[1]/div/div/div[3]", 10) ChartsTab.click() return Charts()
def goToWebcams(self): webcamsTab = elementWarpper( By.XPATH, "//*[@id='msw-js-primaryBurgerContainer']/div[1]/div/div/div[2]", 10) webcamsTab.click() return Webcams()
def goTologin(self): self.loginButton = elementWarpper( By.XPATH, "//*[@id='msw-js-headerPrimary']/div[2]/div/div/div[3]/div/h5/a", 10) self.loginButton.click() return loginPage()
def goToForecasts(self): ForecastTab = elementWarpper( By.XPATH, "//*[@id='msw-js-primaryBurgerContainer']/div[1]/div/div/div[1]/a", 10) ForecastTab.click() time.sleep(5) return Forecast()
def assertSearchresultHeader(self, header): headerElement = elementWarpper( By.XPATH, "//*[@id='msw-js-headerPrimary']/div[6]/div/div[2]/div[1]/div/header/div[2]/h1", 10) assert headerElement.getText() == header
def __init__(self): super().__init__(By.XPATH, "/html/body") self.searchBox = elementWarpper( By.XPATH, "//*[@id='msw-js-headerPrimary']/div[2]/div/div/div[2]/div/span/input[2]", 10)