コード例 #1
0
 def setup_class(self):
     '''用例执行前,启动浏览器,创建chrome实例'''
     driver = webdriver.Chrome()
     driver.maximize_window()
     # 实例化页面
     self.lg = login_page.LoginPage(driver)
     self.sa = sales_order_page.SalesOrderPage(driver)
コード例 #2
0
ファイル: test_optometre_sales.py プロジェクト: QWJ77/big
 def setup_class(self):
     '''用例执行前,启动浏览器,创建chrome实例'''
     driver = webdriver.Chrome()
     driver.maximize_window()
     # 实例化页面
     self.lg = login_page.LoginPage(driver)
     self.op = optometre_sales_page.OptometreSalesPage(driver)
コード例 #3
0
 def setUp(self):
     self.driver = webdriver.Chrome()
     self.base_page = base_page.BasePage(self.driver)
     self.login_page = login_page.LoginPage(self.driver)
     self.profile_page = profile_page.ProfilePage(self.driver)
     self.development_plan_page = udpp.UsersDevelopmentPlan(self.driver)
     self.login_page.sign_in_as(**login_page.VALID_DATA)
     self.profile_page.go_to_development_plan()
コード例 #4
0
    def login(self, request):
        _driver = webdriver.Chrome()

        def quit():
            _driver.quit()

        request.addfinalizer(quit)

        return login_page.LoginPage(_driver)
コード例 #5
0
ファイル: login_test.py プロジェクト: BrianJow/SeleniumGuide
    def login(self, request):
        _geckodriver = os.path.join(os.getcwd(), 'vendor', 'geckodriver')
        driver_ = webdriver.Firefox(executable_path=_geckodriver)

        def quit():
            driver_.quit()

        request.addfinalizer(quit)
        return login_page.LoginPage(driver_)
コード例 #6
0
 def setUp(self):
     self.driver = webdriver.Chrome()
     self.login_page = lp.LoginPage(self.driver)
     self.profile_page = pp.ProfilePage(self.driver)
     self.event_create_page = ecp.EventCreatePage(self.driver)
     self.event_edit_page = eep.EventEditPage(self.driver)
     self.events_page = ep.EventsPage(self.driver)
     self.event_details_page = edp.EventsDetailsPage(self.driver)
     self.login_page.sign_in_as(**lp.VALID_DATA)
コード例 #7
0
 def test_click_login_link(self):
     globalHeader = global_header.GlobalHeaderComponent(self.driver)
     loginPage = login_page.LoginPage(self.driver)
     try:
         globalHeader.login_link_displayed()
         globalHeader.click_login_link()
         assert loginPage.login_header_displayed()
     except NoSuchElementException:
         print("Element is not visible")
コード例 #8
0
 def setUp(self):
     self.driver = webdriver.Chrome()
     self.driver.get(base_page.BASE_URL)
     self.main_window = self.driver.window_handles[0]
     self.driver.execute_script('window.open("{}");'.format(tep.TEMPORARY_EMAIL_CLIENT))
     self.email_window = self.driver.window_handles[1]
     self.sign_up_window = reg_p.RegistationPage(self.driver)
     self.email_service = tep.TemporaryEmailPage(self.driver)
     self.login_window = lp.LoginPage(self.driver)
     self.home_page = hp.HomePage(self.driver)
コード例 #9
0
 def setUp(self):
     self.driver = webdriver.Chrome()
     self.login_page = lp.LoginPage(self.driver)
     self.login_page.sign_in_as(**lp.VALID_DATA)
     self.login_page.is_page_loaded(bp.PROFILE_PAGE_URL)
     self.profile_page = pp.ProfilePage(self.driver)
     self.courses_page = cp.CoursesPage(self.driver)
     self.course_details_page = cdp.CourseDetailsPage(self.driver)
     self.courses_page.go_to()
     self.courses_page.click_on_first_course_on_page()
コード例 #10
0
 class App:
     login_page = LP.LoginPage(driver)
     home_page = HP.HomePage(driver)
     select_procedure_modal = HP.SelectProcedureModal(driver)
     tender_page = TP.TenderPage(driver)
     lot_form = LF.LotForm(driver)
     item_form = IF.ItemForm(driver)
     feature_form = FF.FeatureForm(driver)
     document_form = DF.DocumentForm(driver)
     date_widget = DW.DateWidget(driver)
コード例 #11
0
 def test_edit_account(self):
     """
     test scenario: login existing user, select finance menu, edit account account (index of account is temp solution), verify that acc was changed
     """
     login = login_page.LoginPage(self.driver)
     login.login_existing_user('*****@*****.**', 'auto_qa_kur1')
     menu = base_page_with_table.BasePageWithTable(self.driver)
     menu.select_finance_menu_item()
     finance_menu = finance_page.FinancePage(self.driver)
     finance_menu.edit_account(0, 'acc1', 1, 1, 100)
     self.assertTrue(finance_menu.message_success())
コード例 #12
0
 def test_delete_account(self):
     """
     test scenario: login existing user, select finance menu, delete account, verify that acc was deleted
     """
     login = login_page.LoginPage(self.driver)
     login.login_existing_user('*****@*****.**', 'auto_qa_kur1')
     menu = base_page_with_table.BasePageWithTable(self.driver)
     menu.select_finance_menu_item()
     finance_menu = finance_page.FinancePage(self.driver)
     finance_menu.delete_account_confirm(1)
     self.assertTrue(finance_menu.message_success())
コード例 #13
0
 def test_add_new_account(self):
     """
     test scenario: login existing user, select finance menu, add new account, verify that acc was added
     """
     # setup
     login = login_page.LoginPage(self.driver)
     login.login_existing_user('*****@*****.**', 'auto_qa_kur1')
     menu = base_page_with_table.BasePageWithTable(self.driver)
     menu.select_finance_menu_item()
     finance_menu = finance_page.FinancePage(self.driver)
     finance_menu.add_account('acc1', 1, 1, 100, 200)
     self.assertTrue(finance_menu.message_success())
コード例 #14
0
    def login(self, request):
        _geckodriver = os.path.join(os.getcwd(), 'vendor', 'geckodriver')
        if os.path.isfile(_geckodriver):
            _service = FirefoxService(executable_path=_geckodriver)
            driver_ = webdriver.Firefox(service=_service)
        else:
            driver_ = webdriver.Firefox()

        def quit():
            driver_.quit()
        request.addfinalizer(quit)
        return login_page.LoginPage(driver_)
コード例 #15
0
ファイル: environment.py プロジェクト: gipuk/livejournal.com
def before_all(context):
    context.browser = Browser()
    context.login = login_page.LoginPage()
    context.post = new_post.PostNewEntry()
    context.settings = settings.SettingsTab()
コード例 #16
0
 def setUp(self):
     self.driver = webdriver.Firefox()
     self.login_page = lp.LoginPage(self.driver)
     self.profile_page = pp.ProfilePage(self.driver)
コード例 #17
0
 def setUp(self):
     self.driver = webdriver.Chrome()
     self.login_page = lp.LoginPage(self.driver)
     self.profile_page = pp.ProfilePage(self.driver)
     self.events_page = ep.EventsPage(self.driver)
     self.event_details_page = edp.EventsDetailsPage(self.driver)
コード例 #18
0
    def setUp(self):

        self.driver = webdriver.Chrome()
        self.login_page = lp.LoginPage(self.driver)
        self.profile_page = pp.ProfilePage(self.driver)
        self.course_page = cp.CoursesPage(self.driver)
コード例 #19
0
 def setUp(self):
     self.driver = webdriver.Firefox()
     self.login_page = lp.LoginPage(self.driver)
     self.profile_page = pp.ProfilePage(self.driver)
     self.events_page = ep.EventsPage(self.driver)
     self.events_page.wait = WebDriverWait(self.driver, 3)
コード例 #20
0
ファイル: optometre_public_page.py プロジェクト: QWJ77/big
 def to_purchase_manage(self):
     """进入采购管理"""
     login = login_page.LoginPage(self.driver)
     login.to_opto_operation()
     self.click(self.purchase_manage)
コード例 #21
0
 def login(self, driver):
     return login_page.LoginPage(driver)
コード例 #22
0
ファイル: optometre_public_page.py プロジェクト: QWJ77/big
 def to_inventory_manage(self):
     """进入库存管理"""
     login = login_page.LoginPage(self.driver)
     login.to_opto_operation()
     self.click(self.inventory_manage)
コード例 #23
0
 def setUp(self):
     self.driver = webdriver.Chrome()
     self.login_page = lp.LoginPage(self.driver)
コード例 #24
0
 def setUp(self):
     self.driver = webdriver.Chrome()
     self.login_page = lp.LoginPage(self.driver)
     self.profile_page = pp.ProfilePage(self.driver)
     self.edit_profile_page = epp.EditProfilePage(self.driver)
     self.base_page = bp.BasePage(self.driver)
コード例 #25
0
ファイル: sales_order_page.py プロジェクト: QWJ77/big
        """再开一单--订单金额不能为0"""
        self.another_bill()
        self.click(self.minus_one)
        time.sleep(1)
        # self.sendKeys(self.sale_number_input, 0)
        self.click(self.submit)

    def replace_prescription(self):
        """更换处方"""
        self.another_bill()
        self.click(self.replace_button)
        time.sleep(5)
        self.click(self.new_prescription)
        time.sleep(1)
        self.click(self.choose_prescription)
        time.sleep(1)
        self.submi_bill()


if __name__ == '__main__':

    driver = webdriver.Chrome()
    login = login_page.LoginPage(driver)
    login.login()
    sa = SalesOrderPage(driver)
    time.sleep(1)
    # sa.choose_discount()
    # sa.bill_amount_wrong()
    sa.replace_prescription()

コード例 #26
0
 def setUp(self):
     self.driver = webdriver.Chrome()
     self.courses_page = cp.CoursesPage(self.driver)
     self.login_page = lp.LoginPage(self.driver)
コード例 #27
0
 def setUp(self):
     self.driver = webdriver.Chrome()
     self.login_page = lp.LoginPage(self.driver)
     self.profile_page = pp.ProfilePage(self.driver)
     self.course_page = cc.NewCoursePage(self.driver)
     self.base_page = bp.BasePage(self.driver)
コード例 #28
0
ファイル: login_step.py プロジェクト: shuhaiye/python
def step_impl(context):
    context.login_page = login_page.LoginPage(context.dr)
    context.login_page.url = context.login_page.domain + 'wp-login.php'
    context.login_page.navigate()
コード例 #29
0
 def setUp(self):
     self.driver = webdriver.Chrome()
     self.login_page = lp.LoginPage(self.driver)
     self.edit_profile_page = ep.EditProfilePage(self.driver)
     self.profile_page = pp.ProfilePage(self.driver)
     self.driver.implicitly_wait(30)
コード例 #30
0
def before_all(context):
    context.driver = driver.Driver()
    context.start_page = start_page.StartPage()
    context.login_page = login_page.LoginPage()
    context.main_page = main_page.MainPage()