Ejemplo n.º 1
0
 def test_home_page(self):
     self.loginPage = LoginPage(self.driver)
     self.loginPage.input_username(TestData.username)
     self.loginPage.input_password(TestData.password)
     self.loginPage.click_login_button()
     self.homePage = HomePage(self.driver)
     self.homePage.get_title(TestData.home_page_title)
    def test_click_signin(self):
        driver = self.driver
        driver.get("http://demo.automationtesting.in")

        signinpage = SigninPage(driver)
        signinpage.click_signin()

        registration = RegistrationPage(driver)
        registration.first_name("May")
        registration.last_name("Nineth")
        registration.address("Middle of Nowhere")
        registration.email("*****@*****.**")
        registration.gender()
        registration.hobbies()
        registration.language()
        registration.skills()
        registration.countries()
        registration.DOB()
        registration.phone("5034568963")
        registration.password("Maya123456!")
        registration.second_password("Maya123456!")


        homepage = HomePage(driver)
        homepage.practice_site()

        practicepage = PracticePage(driver)
        practicepage.select_product()

        productpage = ProductPage(driver)
        productpage.add_to_cart()

        cartpage = CartPage(driver)
        cartpage.procede_to_checkout()
    def test_01_login(self):

        print("Navigating to Login Page...")
        self.driver.get(Data.PHP_TRAVELS_WEB_ADDRESS)
        self.driver.maximize_window()

        # waiting for Title element to be present
        title_element = WebDriverWait(self.driver, 20).until(
            ec.element_to_be_clickable((By.XPATH, Locators.login_title_x)))

        login_page = LoginPage(self.driver)
        login_page.set_title(title_element)

        # is_login_page_loaded = login_page.get_title().is_displayed()
        self.assertTrue(login_page.get_title().is_displayed())
        print("Login page is displayed")

        # entering credentials
        login_page.fill_email(Data.LOGIN_ADMIN_EMAIL)
        login_page.fill_password(Data.LOGIN_VALID_PASSWORD)
        print("Username and password entered")

        # clicking on submit button
        login_page.submit()
        print("Login in process...")

        home_page = HomePage(self.driver)
        # is_home_page_loaded = home_page.get_title().is_displayed()
        self.assertTrue(home_page.get_title().is_displayed())
        # self.assertTrue(is_login_page_loaded and is_home_page_loaded, "Login Page or Home page couldn't be loaded")
        print("Login successful")
Ejemplo n.º 4
0
    def test_example_header(self):
        home = HomePage(self.driver)
        self.driver.get(self.page_url)
        home.sync()

        assert home.examples_header.is_displayed(),"Examples header was not displayed"
        print("Test Passed")
Ejemplo n.º 5
0
 def setUp(self):
     self.driver = webdriver.Chrome(Browser['Chrome'])
     self.driver.get(Environments['Prod'])
     self.driver.maximize_window()
     self.home_page = HomePage(self.driver)
     self.search_results = SearchResults(self.driver)
     self.item_page = ItemPage(self.driver)
Ejemplo n.º 6
0
    def test_settings_btn(self):

        login_user = LoginPage(self.driver)
        home_page = login_user.log_in_with_user('*****@*****.**', 'password')

        oauth = HomePage(self.driver)
        self.driver.implicitly_wait(10)
        oauth.click_oauthapp_btn()
        self.driver.implicitly_wait(7)

        add_btn = OuathPage(self.driver)
        add_btn.click_add_btn()
        self.driver.implicitly_wait(7)

        field_name = OuathPage(self.driver)
        self.driver.implicitly_wait(10)
        field_name.filling_name('peter')
        url_name = OuathPage(self.driver)
        url_name.filling_url_field('https://en.wikipedia.org/wiki/OAuth')
        save_form = OuathPage(self.driver)
        save_form.save_form()
        msg_alert = OuathPage(self.driver)
        msg_alert.validate_msg_allert()

        settings_el = OuathPage(self.driver)
        settings_el.display_settings()
        edit_btn = OuathPage(self.driver)
        delete_btn = OuathPage(self.driver)
        self.assertTrue(edit_btn.get_edit_btn and delete_btn.get_del_button)
Ejemplo n.º 7
0
class TestHomePage:
    def test_title(self):

        self.home_page = HomePage(self.driver)

        self.home_page.go_to_page()
        assert self.home_page.get_title() == HomePage.TITLE
Ejemplo n.º 8
0
class TestHappyPaths(BaseTest):
    def test_customer_buy_item_from_search_pay_online_with_paczkomaty_no_login(
            self, url):
        self.homePage = HomePage(self.driver)
        self.homePage.open(url)
        self.homePage.search(item)
        # articlePage.add_to_basket()
        # cartPage.my_cart()
        # cart.go_to_delivery()
        # cart.choose_delivery()
        # cart.choose_payment()
        # cart.go_to_
        # cart.choose_login()
        # cart.go_to_customer_data
        # cart.fill_customer_data()

    def test_customer_buy_item_from_search_by_enter_pay_online_with_paczkomaty_no_login(
            self, url):
        self.homePage = HomePage(self.driver)
        self.homePage.open(url)
        self.homePage.search_by_enter(item)

    def test_main_functions_are_working(self, url):
        self.homePage = HomePage(self.driver)
        self.homePage.main_functions_are_working()
Ejemplo n.º 9
0
 def test_go_expenses_tab(self):
     driver = self.driver
     self.login()
     case_details = CaseDetails(driver)
     home = HomePage(driver)
     home.click_law_suit_page()
     case_details.expenses_tab_entry()
Ejemplo n.º 10
0
class Test_Login_Logout(BaseTest):
    """Login Test"""
    def test_forgot_pwd_link_visible(self):
        self.loginPage = LoginPage(self.driver)
        flag = self.loginPage.is_forgot_pwd_link_visible()
        assert flag

    def test_login_page_title(self):
        self.loginPage = LoginPage(self.driver)
        title = self.loginPage.get_login_page_title(TestData.LOGIN_PAGE_TITLE)
        assert title == TestData.LOGIN_PAGE_TITLE

    def test_login(self):
        self.loginPage = LoginPage(self.driver)
        self.loginPage.do_login(TestData.USERNAME, TestData.PASSWORD)

    """Logout Test"""

    def test_dashboard_tab_visible(self):
        self.homePage = HomePage(self.driver)
        flag = self.homePage.is_dashboard_tab_visible()
        assert flag

    def test_home_page_title(self):
        self.homePage = HomePage(self.driver)
        title = self.homePage.get_home_page_title(TestData.HOME_PAGE_TITLE)
        assert title == TestData.LOGIN_PAGE_TITLE

    def test_logout(self):
        self.homePage = HomePage(self.driver)
        self.homePage.do_logout()
 def test_HomePage(self):
     driver = self.driver
     driver.get(Utils.URL)
     homeObj = HomePage(driver)
     homeObj.NavigateToCellPhone()
     snapObj = snapshot(driver)
     snapObj.screenshot()
Ejemplo n.º 12
0
 def test_checkPrice(self):
     driver = self.driver
     homePage = HomePage(driver)
     homePage.closePopup()
     homePage.closeCookiesPolicy()
     homePage.selectCurrency()
     homePage.checkPrice(3000)
 def test_Register(self):
     driver = self.driver
     #    1. Go to http://automationpractice.com/index.php page
     driver.get("http://automationpractice.com/index.php")
     lp = HomePage(driver)
     at = Authencation(driver)
     ct = CreateAccount(driver)
     rd = Random()
     #    2. Click on sign in button.
     lp.clickSignin()
     #    3. Input email address into Email address field .
     #    4. Click on create an account button.
     at.enterCreateEmailField("Tuanbui" + str(int(round(time.time()))) +
                              "@gmail.com")
     at.clickCreateButton()
     #    5. Fill all personal information.
     #    6. Click on register button.
     ct.CreateAccountFlow(rd.randomString(8), rd.randomString(8),
                          rd.randomString(8), rd.randomString(5),
                          rd.randomString(6), rd.randomString(6),
                          rd.randomString(6), rd.randomString(6),
                          rd.randomString(6),
                          rd.randomNumber1(5, "0123456789"),
                          rd.randomString(6),
                          rd.randomNumber1(10, "0123456789"),
                          rd.randomString(6))
Ejemplo n.º 14
0
 def test_find_case_file_by_case_state(self):
     driver = self.driver
     self.login()
     home = HomePage(driver)
     home.click_law_suit_page()
     lawsuit = LawsuitPage(driver)
     lawsuit.filter_case_by_case_state()
Ejemplo n.º 15
0
 def test_edit_last_case(self):
     driver = self.driver
     self.login()
     lawsuit = LawsuitPage(driver)
     home = HomePage(driver)
     home.click_law_suit_page()
     lawsuit.case_entry_information_edit()
Ejemplo n.º 16
0
 def test_case_list_records(self):
     driver = self.driver
     self.login()
     lawsuit = LawsuitPage(driver)
     home = HomePage(driver)
     home.click_law_suit_page()
     lawsuit.case_list_records()
 def test_login(self):
     self.loginPage = LoginPage(self.driver)
     self.loginPage.do_login(TestData.STANDARD_USER_NAME, TestData.PASSWORD)
     self.homePage = HomePage(self.driver)
     assert self.homePage.get_products_title() == "Products"
     self.sidebar = SideBarPage(self.driver)
     self.sidebar.do_logout()
Ejemplo n.º 18
0
 def test_delete_added_request(self):
     driver = self.driver
     self.login()
     case_details = CaseDetails(driver)
     home = HomePage(driver)
     home.click_law_suit_page()
     case_details.request_tab_entry()
     case_details.delete_added_request()
Ejemplo n.º 19
0
    def test_Register(self, testFixtures):
        homePage = HomePage(self.driver)
        homePage.navigate_to_login_page()

        userInfo = UserDataBean().get_random_user_data()
        registerPage = RegisterPage(self.driver)
        registerPage.navigate_to_registration_page(userInfo)
        registerPage.fill_registration_details(userInfo)
Ejemplo n.º 20
0
 def test_back_previous_page(self):
     driver = self.driver
     self.login()
     home = HomePage(driver)
     home.click_law_suit_page()
     lawsuit = LawsuitPage(driver)
     lawsuit.filter_case_by_file_no()
     lawsuit.back_previous_page()
Ejemplo n.º 21
0
 def test_add_kararlar(self):
     driver = self.driver
     self.login()
     case_details = CaseDetails(driver)
     home = HomePage(driver)
     home.click_law_suit_page()
     case_details.decisions_tab_entry()
     case_details.add_kararlar()
Ejemplo n.º 22
0
 def test_delete_evidence(self):
     driver = self.driver
     self.login()
     case_details = CaseDetails(driver)
     home = HomePage(driver)
     home.click_law_suit_page()
     case_details.evidence_tab_entry()
     case_details.delete_evidence_attachment()
Ejemplo n.º 23
0
 def test_add_received_payment(self):
     driver = self.driver
     self.login()
     case_details = CaseDetails(driver)
     home = HomePage(driver)
     home.click_law_suit_page()
     case_details.expenses_tab_entry()
     case_details.add_received_payment()
Ejemplo n.º 24
0
 def test_delete_letter_of_application(self):
     driver = self.driver
     self.login()
     case_details = CaseDetails(driver)
     home = HomePage(driver)
     home.click_law_suit_page()
     case_details.letter_of_application_tab_entry()
     case_details.delete_letter_of_application()
Ejemplo n.º 25
0
 def test_delete_created_case_by_robot(self):
     driver = self.driver
     self.login()
     home = HomePage(driver)
     home.click_law_suit_page()
     lawsuit = LawsuitPage(driver)
     lawsuit.filter_case_by_file_no()
     lawsuit.delete_created_case_by_robot()
Ejemplo n.º 26
0
 def test_clear_sheet_no_filter(self):
     driver = self.driver
     self.login()
     home = HomePage(driver)
     home.click_law_suit_page()
     lawsuit = LawsuitPage(driver)
     lawsuit.filter_case_by_file_no()
     lawsuit.clear_filtered_search()
Ejemplo n.º 27
0
 def test_delete_case_information(self):
     driver = self.driver
     self.login()
     case_details = CaseDetails(driver)
     home = HomePage(driver)
     home.click_law_suit_page()
     case_details.decisions_tab_entry()
     case_details.delete_case_information()
Ejemplo n.º 28
0
 def test_add_evidence_pdf(self):
     driver = self.driver
     self.login()
     case_details = CaseDetails(driver)
     home = HomePage(driver)
     home.click_law_suit_page()
     case_details.evidence_tab_entry()
     case_details.add_evidence_attachment_pdf()
     time.sleep(5)
Ejemplo n.º 29
0
    def test_login(self,
                   testFixtures,
                   username="******",
                   password="******"):
        homePage = HomePage(self.driver)
        homePage.navigate_to_login_page()

        loginPage = LoginPage(self.driver)
        loginPage.login(username, password)
Ejemplo n.º 30
0
 def test_add_schedule(self):
     lp = LoginPage(self.driver)
     hp = HomePage(self.driver)
     sp = SchedulePage(self.driver)
     lp.login_as("*****@*****.**", "TestAutomationTask")
     hp.click_on_schedule()
     sp.search_for_employee("Test Employee1\n")
     sp.enter_schedule_for_day("08:00-15:00\n", *ScheduleLocator.DAY1)
     sp.driver.refresh()
     sp.search_for_employee("Test Employee1\n")
Ejemplo n.º 31
0
 def test_signIn(self,email,password):
     # To click on sign in button
     HomePage.click_on_sign_button_click(self)
     self.driver.implicitly_wait(30)
     # To enter the email address
     LoginPage.email_submit(self,email)
     # To Submit the email through submit button
     LoginPage.submit_btn1(self)
     time.sleep(10)
     test = self.driver.find_element_by_xpath(".//*[@class='textfield__inputWrapper']/div").is_displayed()
     if test == True:
         self.assertEqual("Enter a valid email address",self.driver.find_element_by_xpath(".//*[@class='textfield__inputWrapper']/div").text)
     else:
         # To enter the password
         LoginPage.password_submit(self,password)
         # Final step to submit the pass and login
         LoginPage.submit_btn2(self)
         self.driver.implicitly_wait(30)
         # Validate login :
         self.assertTrue(MyAccount.check_page(self))
Ejemplo n.º 32
0
    def test_login(self,Username,Password,LoginName):
       self.driver.implicitly_wait(30)
       LoginPage.clear_Credentials(self)
       LoginPage.login(self,Username,Password)

       if(Username == ""):
        sleep(5)
        self.assertEqual(LoginPage.Username_required(self),"* Required")

       elif(Password == ""):
        sleep(5)
        self.assertEqual(LoginPage.Password_required(self),"* Required")

       elif(Username !="Administrator" or Password != "P@ssw0rd"):
        sleep(5)
        self.assertEqual(LoginPage.Invalid_login(self),"Username and/or password is incorrect. For help, contact your administrator.")
       else:
        sleep(3);
        self.assertEqual(LoginName,HomePage.get_login_name(self))
        print(HomePage.get_login_name(self))
Ejemplo n.º 33
0
 def test_login_with_valid_credentials(self,Username,Password,LoginName):
     LoginPage.login(self,Username,Password)
     self.assertEqual(LoginName,HomePage.get_login_name(self))
     print(HomePage.get_login_name(self))
     print("hii")
     print("999")
Ejemplo n.º 34
0
 def test001(self):
     
     home = HomePage(self.driver, self.parser)
     home.enterSearchData("iPhone")
     home.clickSearchButton()