def test_TC_01(self): driver = self.driver driver.get("https://area.mtg-bi.com") login = LoginPage(driver) login.sign_in() login.enter_username("*****@*****.**") login.enter_password("123456") login.click_login()
def test_TC_07(self): driver = self.driver driver.get("https://area.mtg-bi.com") login = LoginPage(driver) login.sign_in() login.enter_username("*****@*****.**") login.enter_password("123455") login.click_login() openElement = driver.find_element_by_xpath("//form/div/div") elementText = openElement.text Text = "Login or password is incorrect!" assert Text == elementText
def test_TC_03(self): driver = self.driver driver.get("https://area.mtg-bi.com") login = LoginPage(driver) login.sign_in() login.enter_username("*****@*****.**") login.enter_password("12345") login.click_login() openElement = driver.find_element_by_xpath("//form/div[2]/div") elementText = openElement.text Text = "The entered password must be not less than 6 symbols." assert Text == elementText
def test_TC_01(self): driver = self.driver driver.get("https://area.mtg-bi.com") #Сценарий логина - Начало login = LoginPage(driver) login.sign_in() login.enter_username("*****@*****.**") login.enter_password("123456") login.click_login() homepage = HomePage(driver) homepage.open_profile_menu() homepage.click_logout() time.sleep(3)
def test_TC_02(self): driver = self.driver driver.get("https://area.mtg-bi.com") login = LoginPage(driver) login.sign_in() login.enter_username("") login.enter_password("") login.click_login() openElement = driver.find_element_by_css_selector( "div.invalid-feedback") elementText = openElement.text Text = "Login is not given." assert Text == elementText openElement2 = driver.find_element_by_xpath("//form/div[2]/div") elementText2 = openElement2.text Text2 = "Password is not given." assert Text2 == elementText2
def test_TC_10(self): driver = self.driver driver.get("https://area.mtg-bi.com") login = LoginPage(driver) login.sign_in() login.enter_username("*****@*****.**") login.enter_password("123456") login.click_login() homepage = HomePage(driver) homepage.open_profile_menu() homepage.open_profile() homepage.select_country("Russia") homepage.enter_phone("9181234567") homepage.select_business_segment("Finance") homepage.click_update() homepage.open_profile_menu() homepage.click_logout()
def test_TC_14(self): driver = self.driver driver.get("https://area.mtg-bi.com") login = LoginPage(driver) login.sign_in() login.enter_username("*****@*****.**") login.enter_password("123456") login.click_login() homepage = HomePage(driver) homepage.open_profile_menu() homepage.open_profile() homepage.select_country("United States") homepage.enter_phone_code("+1") homepage.enter_phone("202 679 45 01") homepage.select_business_segment("Health Care") homepage.click_update() homepage.open_profile_menu() homepage.click_logout()