Example #1
0
        imgBase64 = self.driver.page_base64(self.filePath(), 'login')
        screenshotBase64 = self.driver.screenshot_base64(
            self.filePath(), 'login')
        self.assertTrue(imgBase64 == screenshotBase64)

    def test_sso_btn(self):
        queryDict = queryFactory().getQuery().login_login_SSOBtn()
        sso_btn = self.driver.findView(queryDict)
        self.driver.clickOnView(sso_btn)
        self.driver.waitForSeconds(5)
        filename = self.filePath() + "/" + "sso.png"
        self.driver.takeScreenshotAsPNGFileByPath(filename)

        imgBase64 = self.driver.page_base64(self.filePath(), 'sso')
        screenshotBase64 = self.driver.screenshot_base64(
            self.filePath(), 'sso')

        query_dict = queryFactory().getQuery().login_sso_backBtn()
        back_btn = self.driver.findView(query_dict)
        self.driver.clickOnView(back_btn)

        self.assertTrue(imgBase64 == screenshotBase64)

    def test_last_test(self):
        pass


suite = testLoader().loadAllTestsFromClass(False, None, welcome)
suite = testLoader().loadAllTestsFromClass(False, suite, login)
unittest.TextTestRunner(verbosity=2).run(suite)
driverFactory().stopDriver()
Example #2
0
    def test_source(self):
        # get main view soruce
        source_main = self.driver.driver.page_source
        self.assertIn("XCUIElementTypeTable", source_main)
        self.assertIn("Text Fields", source_main)

        # got to text fields section
        self._open_menu_position(13)
        sleep(10)
        source_textfields = self.driver.driver.page_source
        self.assertIn("XCUIElementTypeStaticText", source_textfields)
        self.assertIn("Text Fields", source_textfields)

        self.assertNotEqual(source_main, source_textfields)


# suite = unittest.TestSuite()
# suite.addTest(samp le01(False,'test_find_element'))
# suite.addTest(sample01(False,'test_frames'))
# suite.addTest(sample01(False,'test_location'))
# suite.addTest(sample01(False,'test_screenshot'))
# suite.addTest(sample01(False,'test_text_field_edit'))
# suite.addTest(sample01(False,'test_alert_interaction'))
# suite.addTest(sample01(False,'test_slider'))
# suite.addTest(sample01(False,'test_sessions'))
# suite.addTest(sample01(False,'test_size'))
# suite.addTest(sample01(False,'test_source'))

suite1 = testLoader().loadAllTestsFromClass(True, None, sample01)
unittest.TextTestRunner(verbosity=2).run(suite1)
Example #3
0
        pass

    def test_ui(self):
        # click login button

        self.driver.waitForSeconds(2)
        query = queryFactory().getQuery()
        sso_login_btn = self.driver.findView(query.login_login_SSOBtn())
        self.driver.clickOnView(sso_login_btn)

        self.driver.waitForSeconds(3)
        filename = self.filePath() + "/" + "sso.png"
        self.driver.takeScreenshotAsPNGFileByPath(filename)

        imgBase64 = self.driver.page_base64(self.filePath(), 'sso')
        screenshotBase64 = self.driver.screenshot_base64(
            self.filePath(), 'sso')
        self.assertTrue(imgBase64 == screenshotBase64)

    def test_continue_btn(self):
        pass

    def test_last_test(self):
        pass


suite = testLoader().loadAllTestsFromClass(False, None, login)
suite = testLoader().loadAllTestsFromClass(False, None, ssologin)
unittest.TextTestRunner(verbosity=2).run(suite)
driverFactory().stopDriver()
        # messageList = self.driver.findView(query.msg_messages_list())

        self.driver.swipe(800, 1200, 800, 400, 500)

        # touchActions = self.driver.moveTo(200, 400, touchActions,True)
        # self.driver.touchUp(200, 400, touchActions)
        filename = self.filePath() + "/" + "scroolTo.png"
        self.driver.takeScreenshotAsPNGFileByPath(filename)

        # self.driver.waitForSeconds(2)
        # message_item = self.driver.findView(query.menu_messages_item())
        # self.driver.clickOnView(message_item)
        #
        # self.driver.waitForSeconds(12)
        # messageList = self.driver.findView(query.msg_messages_list())
        # self.driver.scroolOnView(messageList, 200, 120, None, False)

        self.driver.waitForSeconds(10)
        # imgBase64 = self.driver.page_base64(self.filePath(), 'left_menu')
        # screenshotBase64 = self.driver.screenshot_base64(self.filePath(), 'left_menu')
        # self.assertTrue(imgBase64 == screenshotBase64)
        pass

    def test_last_test(self):
        pass


suite = testLoader().loadAllTestsFromClass(False, None, messageList)
unittest.TextTestRunner(verbosity=2).run(suite)
driverFactory().stopDriver()
Example #5
0
    def endTest(self):
        pass

    def test_ui(self):
        pass

    def test_startUsingNow_btn(self):
        self.driver.waitForSeconds(2)
        queryDict = queryFactory().getQuery().login_welcome_startUsingBtn()
        startUsing_btn = self.driver.findView(queryDict)
        self.driver.clickOnView(startUsing_btn)

        self.driver.waitForSeconds(3)
        filename = self.filePath() + "/" + "anonymousMain.png"
        self.driver.takeScreenshotAsPNGFileByPath(filename)

        imgBase64 = self.driver.page_base64(self.filePath(), 'anonymousMain')
        screenshotBase64 = self.driver.screenshot_base64(
            self.filePath(), 'anonymousMain')
        self.assertTrue(imgBase64 == screenshotBase64)

    def test_last_test(self):
        pass


suite = testLoader().loadAllTestsFromClass(False, None, welcome)
suite = testLoader().loadAllTestsFromClass(False, suite, quickStart)
unittest.TextTestRunner(verbosity=2).run(suite)
driverFactory().stopDriver()
Example #6
0
    def test_menu_ui(self):
        # click login button

        self.driver.waitForSeconds(3)

        query = queryFactory().getQuery()
        left_menu = self.driver.findView(query.top_bar_menu())
        self.driver.clickOnView(left_menu)

        self.driver.waitForSeconds(2)
        filename = self.filePath() + "/" + "left_menu.png"
        self.driver.takeScreenshotAsPNGFileByPath(filename)

        self.driver.waitForSeconds(2)
        local_item = self.driver.findView(query.menu_local_item())
        self.driver.clickOnView(local_item)

        # imgBase64 = self.driver.page_base64(self.filePath(), 'left_menu')
        # screenshotBase64 = self.driver.screenshot_base64(self.filePath(), 'left_menu')
        # self.assertTrue(imgBase64 == screenshotBase64)
        pass

    def test_last_test(self):
        pass


suite = testLoader().loadAllTestsFromClass(False, None, anonymousLocal)
unittest.TextTestRunner(verbosity=2).run(suite)
driverFactory().stopDriver()