def test_1415(self):
     rm_email('*****@*****.**')
     action.signup(email="*****@*****.**")
     action.verify(verify='code', Useremail='*****@*****.**')
     action.back()
     action.logout()
     action.login('*****@*****.**', 'a12345678')
     self.assertTrue(
         action.wait(
             type='id',
             el="com.deepblu.android.deepblu.internal:id/headerContainer"))
     android_signup_test.result = True
 def test_1951(self):
     email = action.signup()
     action.signup_skip()
     action.logout()
     action.login(email, 'a12345678')
     self.assertTrue(
         action.wait(
             type='id',
             el=
             "com.deepblu.android.deepblu.internal:id/activity_toolbar_title"
         ))
     android_signup_test.result = True
Exemplo n.º 3
0
    def get_message(self):
        locate_type, locate_expression = self.account_page_items[
            'new_account_page.message'].split('>')
        return get_element(self.driver, locate_type, locate_expression)


if __name__ == '__main__':
    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_experimental_option('useAutomationExtension', False)
    driver = webdriver.Chrome(
        options=chrome_options,
        desired_capabilities=chrome_options.to_capabilities(),
        executable_path=
        'C:\\PycharmProjects\\data_driven_test\\chromedriver.exe')
    driver.get('https://ap8.salesforce.com/')
    driver.maximize_window()
    login(driver, '*****@*****.**', 'passwordtest')
    time.sleep(20)
    acc = Account(driver)
    acc.get_account_link()
    acc.get_new_button().click()
    timestamp = time.strftime('%Y%m%d%H%M%S', time.localtime(time.time()))
    acc_name_text = 'jessicatest' + timestamp
    acc.get_account_name().send_keys(acc_name_text)
    acc.get_account_number().send_keys(timestamp)
    acc.get_rating_ddl().click()
    acc.get_rating_option().click()
    acc.get_save_button().click()
    message = acc.get_message()
    assert message.text == f'Account "{acc_name_text}" was created.', 'Actual message is: ' + message.text
 def test_95(self):
     action.login()
     self.assertTrue(action.wait(type='xpath', el=GlobalString.create_post))
     android_login_test.result = True
Exemplo n.º 5
0
driver = webdriver.Chrome(
    options=chrome_options,
    desired_capabilities=chrome_options.to_capabilities(),
    executable_path='C:\\PycharmProjects\\data_driven_test\\chromedriver.exe')
driver.get('https://ap8.salesforce.com/')
driver.maximize_window()

pe = ParseExcel(test_data_excel_path)
pe.set_sheet_by_name('login')
rows = pe.get_all_rows()[1:]
for id, row in enumerate(rows):
    if row[4].value.upper() == 'Y':
        username = row[1].value
        password = row[2].value
        try:
            login(driver, username, password)
            pe.set_sheet_by_name('account')
            acc_rows = pe.get_all_rows()[1:]
            test_data_pass_flag = True  # 结果表示,用于最后写入excel结果
            for acc_id, acc_row in enumerate(acc_rows):
                if acc_row[5].value.upper() == 'Y':
                    account_name = acc_row[1].value
                    account_number = acc_row[2].value
                    account_rating_option = acc_row[3].value
                    try:
                        message = new_account(driver, account_name,
                                              account_number,
                                              account_rating_option)
                        # pe.write_cell_current_time(acc_id + 2, 7)  # 执行时间
                        pe.write_cell_content(acc_id + 2, 7, date_time())
                        if message == acc_row[4].value: