awetestlib 0.1.28 → 0.1.29pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitattributes +22 -22
- data/.gitignore +69 -69
- data/.yardopts +7 -7
- data/README.md +108 -108
- data/awetestlib.gemspec +57 -57
- data/awetestlib.windows.gemspec +41 -41
- data/awetestlib_notes.txt +4 -4
- data/awetestlib_osx.gemspec +47 -48
- data/bin/awetestlib +99 -99
- data/bin/awetestlib-android-setup.rb +26 -26
- data/bin/awetestlib-cucumber-setup.rb +28 -28
- data/bin/awetestlib-driver-setup.rb +21 -21
- data/bin/awetestlib-helpers.rb +41 -41
- data/bin/awetestlib-mobile-app-setup.rb +31 -31
- data/bin/awetestlib-netbeans-setup.rb +58 -58
- data/bin/awetestlib-regression-setup.rb +15 -15
- data/bin/awetestlib-rubymine-setup.rb +39 -39
- data/drivers/chromedriver.exe +0 -0
- data/ext/Rakefile +1 -1
- data/ext/mkrf_conf.rb +27 -27
- data/lib/awetestlib/html_report.rb +142 -142
- data/lib/awetestlib/logging.rb +366 -366
- data/lib/awetestlib/regression/browser.rb +1380 -1375
- data/lib/awetestlib/regression/drag_and_drop.rb +421 -420
- data/lib/awetestlib/regression/find.rb +345 -345
- data/lib/awetestlib/regression/legacy.rb +1187 -1187
- data/lib/awetestlib/regression/page_data.rb +191 -191
- data/lib/awetestlib/regression/runner.rb +307 -307
- data/lib/awetestlib/regression/tables.rb +627 -619
- data/lib/awetestlib/regression/user_input.rb +576 -576
- data/lib/awetestlib/regression/utilities.rb +1046 -988
- data/lib/awetestlib/regression/validations.rb +1093 -1074
- data/lib/awetestlib/regression/waits.rb +470 -470
- data/lib/awetestlib/runner.rb +18 -18
- data/lib/awetestlib.rb +41 -41
- data/lib/patches/README +2 -2
- data/lib/patches/firewatir.rb +106 -106
- data/lib/patches/watir.rb +175 -175
- data/lib/version.rb +2 -2
- data/license.txt +13 -13
- data/netbeans_setup.md +29 -29
- data/rdoc_test.bat +1 -1
- data/rubymine_setup.md +23 -23
- data/setup_samples/sample_android/features/dk.mejer.hansen.control.FlyingColorsPlayerAidActivity.apk +0 -0
- data/setup_samples/sample_android/features/sample_android.feature +5 -5
- data/setup_samples/sample_android/features/step_definitions/calabash_steps.rb +1 -1
- data/setup_samples/sample_android/features/support/app_installation_hooks.rb +36 -36
- data/setup_samples/sample_android/features/support/app_life_cycle_hooks.rb +14 -14
- data/setup_samples/sample_android/features/test_servers/8ba795a0288381ae346b67867b586881_0.3.2.apk +0 -0
- data/setup_samples/sample_cucumber/features/step_definitions/predefined_steps.rb +76 -76
- data/setup_samples/sample_cucumber/features/yahoo_mail.feature +11 -11
- data/setup_samples/sample_mobile_app/features/my_first.feature +14 -14
- data/setup_samples/sample_mobile_app/features/step_definitions/predefined_webview_steps.rb +80 -80
- data/setup_samples/sample_mobile_app/features/support/env.rb +2 -2
- data/setup_samples/sample_netbeans/demo.rb +86 -86
- data/setup_samples/sample_netbeans/nbproject/configs/Demo.properties +2 -2
- data/setup_samples/sample_netbeans/nbproject/private/config.properties +1 -1
- data/setup_samples/sample_netbeans/nbproject/private/configs/Demo.properties +2 -2
- data/setup_samples/sample_netbeans/nbproject/private/private.properties +2 -2
- data/setup_samples/sample_netbeans/nbproject/project.properties +5 -5
- data/setup_samples/sample_netbeans/nbproject/project.xml +13 -13
- data/setup_samples/sample_rubymine/.idea/encodings.xml +5 -5
- data/setup_samples/sample_rubymine/.idea/misc.xml +5 -5
- data/setup_samples/sample_rubymine/.idea/modules.xml +9 -9
- data/setup_samples/sample_rubymine/.idea/sample_rubymine.iml +9 -9
- data/setup_samples/sample_rubymine/.idea/scopes/scope_settings.xml +4 -4
- data/setup_samples/sample_rubymine/.idea/vcs.xml +7 -7
- data/setup_samples/sample_rubymine/.idea/workspace.xml +213 -213
- data/setup_samples/sample_rubymine/demo.rb +86 -86
- data/test/create_zoho.rb +66 -66
- data/test/create_zoho_account1.rb +68 -68
- data/test/create_zoho_account2.rb +72 -72
- data/test/demo.rb +87 -87
- data/test/google_search1.rb +16 -16
- data/test/google_search2.rb +19 -19
- data/test/login_1.rb +37 -37
- data/test/login_1a.rb +37 -37
- data/test/login_2.rb +32 -32
- data/test/zoho_exercise.rb +21 -21
- data/test/zoho_util.rb +487 -487
- data/tmp/placeholder.html +71 -71
- metadata +18 -49
@@ -1,86 +1,86 @@
|
|
1
|
-
module Demo
|
2
|
-
def run
|
3
|
-
browser = open_browser
|
4
|
-
login(browser)
|
5
|
-
test_zoho(browser)
|
6
|
-
end
|
7
|
-
|
8
|
-
def test_account_lookup(browser)
|
9
|
-
mark_testlevel('Account Lookup', 1)
|
10
|
-
browser.image(:title, 'Account Name Lookup').click
|
11
|
-
sleep_for(5)
|
12
|
-
popup = attach_browser_by_url(browser, /Parent/)
|
13
|
-
# TODO: This should be transparent:
|
14
|
-
if @browserAbbrev == "FF"
|
15
|
-
popup = browser
|
16
|
-
end
|
17
|
-
set_textfield_by_name(popup, 'fldValue', 'test')
|
18
|
-
click_button_by_value(popup, 'Go')
|
19
|
-
popup.link(:text, /Test Account/).click
|
20
|
-
#browser = attach_browser_by_url(browser, /ShowHomePage/)
|
21
|
-
#validate_textfield_value_by_name(browser, /Parent Account/, 'Test Account #007')
|
22
|
-
end
|
23
|
-
|
24
|
-
def login(browser)
|
25
|
-
mark_testlevel('Zoho Login', 2)
|
26
|
-
user = "joeklienwatir@gmail.com" #@zohologin.cell(2,2)
|
27
|
-
password = "watir001" #@zohologin.cell(2,3)
|
28
|
-
go_to_url(browser, "https://accounts.zoho.com/login?serviceurl=https://www.zoho.com/&hide_signup=true&css=https://www.zoho.com/css/login.css")
|
29
|
-
#browser.goto("https://accounts.zoho.com/login?serviceurl=https://www.zoho.com/&hide_signup=true&css=https://www.zoho.com/css/login.css")
|
30
|
-
set_textfield_by_name(browser, 'lid', user)
|
31
|
-
set_textfield_by_name(browser, 'pwd', password)
|
32
|
-
click_button_by_value(browser, 'Sign In')
|
33
|
-
go_to_url(browser, url = 'https://crm.zoho.com/crm/ShowHomePage.do')
|
34
|
-
validate_text(browser, 'Welcome joeklienwatir at Software')
|
35
|
-
#click_text(browser, 'Old Version')
|
36
|
-
|
37
|
-
end
|
38
|
-
|
39
|
-
def navigate_to_crm(browser)
|
40
|
-
mark_testlevel('Navigate to CRM', 1)
|
41
|
-
click_text(browser, 'CRM')
|
42
|
-
end
|
43
|
-
|
44
|
-
def test_zoho(browser)
|
45
|
-
#get_variables("#{@myRoot}/zoho_variables.xls")
|
46
|
-
navigate_to_crm(browser) #In Project Util
|
47
|
-
create_account(browser)
|
48
|
-
#create_blank_new_account(browser)
|
49
|
-
#export_accounts(browser)
|
50
|
-
#import_accounts(browser)
|
51
|
-
#signout(browser)
|
52
|
-
end
|
53
|
-
|
54
|
-
def create_account(browser)
|
55
|
-
mark_testlevel('Create New Account', 3)
|
56
|
-
sleep_for(3)
|
57
|
-
click_link(browser, 'Accounts')
|
58
|
-
sleep_for(3)
|
59
|
-
click_button_by_value(browser, 'New Account')
|
60
|
-
sleep_for(5)
|
61
|
-
# Watir::Waiter::wait_until { browser.text_field(:name, /Account Name/).exist? }
|
62
|
-
# Watir::Waiter::wait_until { browser.text_field(:name, /Account Name/).visible? }
|
63
|
-
set_textfield_by_name(browser, /Account Name/, "Test Account #1")
|
64
|
-
set_textfield_by_name(browser, /Phone/, "415-333-2311")
|
65
|
-
|
66
|
-
test_account_lookup(browser) #In Project Util
|
67
|
-
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
68
|
-
select_option_by_name_and_option_text(browser, /Account Type/, "Analyst")
|
69
|
-
select_option_by_name_and_option_text(browser, /Industry/, "ASP")
|
70
|
-
set_textfield_by_name(browser, /Billing Street/, "201 Main St")
|
71
|
-
set_textfield_by_name(browser, /Billing City/, "San Francisco")
|
72
|
-
set_textfield_by_name(browser, /Billing State/, "CA")
|
73
|
-
set_textfield_by_name(browser, /Billing Code/, "94102")
|
74
|
-
set_textfield_by_name(browser, /Billing Country/, "USA")
|
75
|
-
#browser.cell(:text, 'Billing to Shipping').click
|
76
|
-
click_button_by_id(browser, 'copyAddress')
|
77
|
-
sleep_for(5)
|
78
|
-
click_button_by_value(browser, 'Save')
|
79
|
-
|
80
|
-
sleep_for(8)
|
81
|
-
#wait_until_by_text(browser, 'Test Account #1')
|
82
|
-
validate_text(browser, "Test Account #1")
|
83
|
-
validate_text(browser, "random")
|
84
|
-
end
|
85
|
-
|
86
|
-
end
|
1
|
+
module Demo
|
2
|
+
def run
|
3
|
+
browser = open_browser
|
4
|
+
login(browser)
|
5
|
+
test_zoho(browser)
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_account_lookup(browser)
|
9
|
+
mark_testlevel('Account Lookup', 1)
|
10
|
+
browser.image(:title, 'Account Name Lookup').click
|
11
|
+
sleep_for(5)
|
12
|
+
popup = attach_browser_by_url(browser, /Parent/)
|
13
|
+
# TODO: This should be transparent:
|
14
|
+
if @browserAbbrev == "FF"
|
15
|
+
popup = browser
|
16
|
+
end
|
17
|
+
set_textfield_by_name(popup, 'fldValue', 'test')
|
18
|
+
click_button_by_value(popup, 'Go')
|
19
|
+
popup.link(:text, /Test Account/).click
|
20
|
+
#browser = attach_browser_by_url(browser, /ShowHomePage/)
|
21
|
+
#validate_textfield_value_by_name(browser, /Parent Account/, 'Test Account #007')
|
22
|
+
end
|
23
|
+
|
24
|
+
def login(browser)
|
25
|
+
mark_testlevel('Zoho Login', 2)
|
26
|
+
user = "joeklienwatir@gmail.com" #@zohologin.cell(2,2)
|
27
|
+
password = "watir001" #@zohologin.cell(2,3)
|
28
|
+
go_to_url(browser, "https://accounts.zoho.com/login?serviceurl=https://www.zoho.com/&hide_signup=true&css=https://www.zoho.com/css/login.css")
|
29
|
+
#browser.goto("https://accounts.zoho.com/login?serviceurl=https://www.zoho.com/&hide_signup=true&css=https://www.zoho.com/css/login.css")
|
30
|
+
set_textfield_by_name(browser, 'lid', user)
|
31
|
+
set_textfield_by_name(browser, 'pwd', password)
|
32
|
+
click_button_by_value(browser, 'Sign In')
|
33
|
+
go_to_url(browser, url = 'https://crm.zoho.com/crm/ShowHomePage.do')
|
34
|
+
validate_text(browser, 'Welcome joeklienwatir at Software')
|
35
|
+
#click_text(browser, 'Old Version')
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
def navigate_to_crm(browser)
|
40
|
+
mark_testlevel('Navigate to CRM', 1)
|
41
|
+
click_text(browser, 'CRM')
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_zoho(browser)
|
45
|
+
#get_variables("#{@myRoot}/zoho_variables.xls")
|
46
|
+
navigate_to_crm(browser) #In Project Util
|
47
|
+
create_account(browser)
|
48
|
+
#create_blank_new_account(browser)
|
49
|
+
#export_accounts(browser)
|
50
|
+
#import_accounts(browser)
|
51
|
+
#signout(browser)
|
52
|
+
end
|
53
|
+
|
54
|
+
def create_account(browser)
|
55
|
+
mark_testlevel('Create New Account', 3)
|
56
|
+
sleep_for(3)
|
57
|
+
click_link(browser, 'Accounts')
|
58
|
+
sleep_for(3)
|
59
|
+
click_button_by_value(browser, 'New Account')
|
60
|
+
sleep_for(5)
|
61
|
+
# Watir::Waiter::wait_until { browser.text_field(:name, /Account Name/).exist? }
|
62
|
+
# Watir::Waiter::wait_until { browser.text_field(:name, /Account Name/).visible? }
|
63
|
+
set_textfield_by_name(browser, /Account Name/, "Test Account #1")
|
64
|
+
set_textfield_by_name(browser, /Phone/, "415-333-2311")
|
65
|
+
|
66
|
+
test_account_lookup(browser) #In Project Util
|
67
|
+
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
68
|
+
select_option_by_name_and_option_text(browser, /Account Type/, "Analyst")
|
69
|
+
select_option_by_name_and_option_text(browser, /Industry/, "ASP")
|
70
|
+
set_textfield_by_name(browser, /Billing Street/, "201 Main St")
|
71
|
+
set_textfield_by_name(browser, /Billing City/, "San Francisco")
|
72
|
+
set_textfield_by_name(browser, /Billing State/, "CA")
|
73
|
+
set_textfield_by_name(browser, /Billing Code/, "94102")
|
74
|
+
set_textfield_by_name(browser, /Billing Country/, "USA")
|
75
|
+
#browser.cell(:text, 'Billing to Shipping').click
|
76
|
+
click_button_by_id(browser, 'copyAddress')
|
77
|
+
sleep_for(5)
|
78
|
+
click_button_by_value(browser, 'Save')
|
79
|
+
|
80
|
+
sleep_for(8)
|
81
|
+
#wait_until_by_text(browser, 'Test Account #1')
|
82
|
+
validate_text(browser, "Test Account #1")
|
83
|
+
validate_text(browser, "random")
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
data/test/create_zoho.rb
CHANGED
@@ -1,66 +1,66 @@
|
|
1
|
-
$watir_script = true
|
2
|
-
module CreateZohoAccount1
|
3
|
-
|
4
|
-
def run_test(browser)
|
5
|
-
create_account_scenario_1(browser)
|
6
|
-
create_account_scenario_2(browser)
|
7
|
-
end
|
8
|
-
|
9
|
-
def create_account_scenario_1(browser)
|
10
|
-
create_account(browser)
|
11
|
-
create_blank_new_account(browser)
|
12
|
-
export_accounts(browser)
|
13
|
-
import_accounts(browser)
|
14
|
-
signout(browser)
|
15
|
-
end
|
16
|
-
|
17
|
-
def create_account_scenario_2(browser)
|
18
|
-
create_blank_new_account(browser)
|
19
|
-
reports(browser)
|
20
|
-
clone_account(browser)
|
21
|
-
pagination(browser)
|
22
|
-
verify_accounts(browser)
|
23
|
-
search_accounts(browser)
|
24
|
-
signout(browser)
|
25
|
-
end
|
26
|
-
|
27
|
-
def create_account(browser)
|
28
|
-
mark_testlevel('Create New Account', 1)
|
29
|
-
sleep_for(3)
|
30
|
-
click_text(browser, 'New Account')
|
31
|
-
wait_until_ready(browser, :name, /Account Name/)
|
32
|
-
set_textfield_by_name(browser, /Account Name/, "Test Account #1")
|
33
|
-
set_textfield_by_name(browser, /Phone/, "415-333-2311")
|
34
|
-
|
35
|
-
test_account_lookup(browser) #In Project Util
|
36
|
-
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
37
|
-
select_option_by_name_and_option_text(browser, /Account Type/, "Analyst")
|
38
|
-
select_option_by_name_and_option_text(browser, /Industry/, "ASP")
|
39
|
-
set_textfield_by_name(browser, /Billing Street/, "201 Main St")
|
40
|
-
set_textfield_by_name(browser, /Billing City/, "San Francisco")
|
41
|
-
set_textfield_by_name(browser, /Billing State/, "CA")
|
42
|
-
set_textfield_by_name(browser, /Billing Code/, "94102")
|
43
|
-
set_textfield_by_name(browser, /Billing Country/, "USA")
|
44
|
-
#browser.cell(:text, 'Billing to Shipping').click
|
45
|
-
click(browser, :cell, :text, 'Billing to Shipping')
|
46
|
-
click_button_by_value(browser, 'Save')
|
47
|
-
|
48
|
-
wait_until_by_text(browser, 'Test Account #1')
|
49
|
-
validate_text(browser, "Test Account #1")
|
50
|
-
validate_text(browser, "random")
|
51
|
-
end
|
52
|
-
|
53
|
-
def test_account_lookup(browser)
|
54
|
-
mark_testlevel('Account Lookup', 1)
|
55
|
-
click(browser, :image, :title, 'Account Name Lookup')
|
56
|
-
sleep_for(5)
|
57
|
-
popup = attach_browser_by_url(browser, /Parent Account/)
|
58
|
-
set_textfield_by_name(popup, 'fldValue', 'test account #00')
|
59
|
-
click_button_by_value(popup, 'Go')
|
60
|
-
click(popup, :link, :text, 'Test Account #007')
|
61
|
-
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
62
|
-
validate_textfield_value_by_name(browser, /Parent Account/, 'Test Account #007')
|
63
|
-
end
|
64
|
-
|
65
|
-
|
66
|
-
end
|
1
|
+
$watir_script = true
|
2
|
+
module CreateZohoAccount1
|
3
|
+
|
4
|
+
def run_test(browser)
|
5
|
+
create_account_scenario_1(browser)
|
6
|
+
create_account_scenario_2(browser)
|
7
|
+
end
|
8
|
+
|
9
|
+
def create_account_scenario_1(browser)
|
10
|
+
create_account(browser)
|
11
|
+
create_blank_new_account(browser)
|
12
|
+
export_accounts(browser)
|
13
|
+
import_accounts(browser)
|
14
|
+
signout(browser)
|
15
|
+
end
|
16
|
+
|
17
|
+
def create_account_scenario_2(browser)
|
18
|
+
create_blank_new_account(browser)
|
19
|
+
reports(browser)
|
20
|
+
clone_account(browser)
|
21
|
+
pagination(browser)
|
22
|
+
verify_accounts(browser)
|
23
|
+
search_accounts(browser)
|
24
|
+
signout(browser)
|
25
|
+
end
|
26
|
+
|
27
|
+
def create_account(browser)
|
28
|
+
mark_testlevel('Create New Account', 1)
|
29
|
+
sleep_for(3)
|
30
|
+
click_text(browser, 'New Account')
|
31
|
+
wait_until_ready(browser, :name, /Account Name/)
|
32
|
+
set_textfield_by_name(browser, /Account Name/, "Test Account #1")
|
33
|
+
set_textfield_by_name(browser, /Phone/, "415-333-2311")
|
34
|
+
|
35
|
+
test_account_lookup(browser) #In Project Util
|
36
|
+
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
37
|
+
select_option_by_name_and_option_text(browser, /Account Type/, "Analyst")
|
38
|
+
select_option_by_name_and_option_text(browser, /Industry/, "ASP")
|
39
|
+
set_textfield_by_name(browser, /Billing Street/, "201 Main St")
|
40
|
+
set_textfield_by_name(browser, /Billing City/, "San Francisco")
|
41
|
+
set_textfield_by_name(browser, /Billing State/, "CA")
|
42
|
+
set_textfield_by_name(browser, /Billing Code/, "94102")
|
43
|
+
set_textfield_by_name(browser, /Billing Country/, "USA")
|
44
|
+
#browser.cell(:text, 'Billing to Shipping').click
|
45
|
+
click(browser, :cell, :text, 'Billing to Shipping')
|
46
|
+
click_button_by_value(browser, 'Save')
|
47
|
+
|
48
|
+
wait_until_by_text(browser, 'Test Account #1')
|
49
|
+
validate_text(browser, "Test Account #1")
|
50
|
+
validate_text(browser, "random")
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_account_lookup(browser)
|
54
|
+
mark_testlevel('Account Lookup', 1)
|
55
|
+
click(browser, :image, :title, 'Account Name Lookup')
|
56
|
+
sleep_for(5)
|
57
|
+
popup = attach_browser_by_url(browser, /Parent Account/)
|
58
|
+
set_textfield_by_name(popup, 'fldValue', 'test account #00')
|
59
|
+
click_button_by_value(popup, 'Go')
|
60
|
+
click(popup, :link, :text, 'Test Account #007')
|
61
|
+
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
62
|
+
validate_textfield_value_by_name(browser, /Parent Account/, 'Test Account #007')
|
63
|
+
end
|
64
|
+
|
65
|
+
|
66
|
+
end
|
@@ -1,68 +1,68 @@
|
|
1
|
-
#include 'pry'
|
2
|
-
$watir_script = true
|
3
|
-
module CreateZohoAccount1
|
4
|
-
|
5
|
-
def run_test(browser)
|
6
|
-
create_account_scenario_1(browser)
|
7
|
-
create_account_scenario_2(browser)
|
8
|
-
end
|
9
|
-
|
10
|
-
def create_account_scenario_1(browser)
|
11
|
-
create_account(browser)
|
12
|
-
create_blank_new_account(browser)
|
13
|
-
export_accounts(browser)
|
14
|
-
import_accounts(browser)
|
15
|
-
signout(browser)
|
16
|
-
end
|
17
|
-
|
18
|
-
def create_account_scenario_2(browser)
|
19
|
-
create_blank_new_account(browser)
|
20
|
-
reports(browser)
|
21
|
-
clone_account(browser)
|
22
|
-
pagination(browser)
|
23
|
-
verify_accounts(browser)
|
24
|
-
search_accounts(browser)
|
25
|
-
signout(browser)
|
26
|
-
end
|
27
|
-
|
28
|
-
def create_account(browser)
|
29
|
-
mark_testlevel('Create New Account', 1)
|
30
|
-
sleep_for(3)
|
31
|
-
click(browser, :link, :text, 'New Account')
|
32
|
-
wait_until_ready(browser, :name, /Account Name/)
|
33
|
-
set_textfield_by_name(browser, /Account Name/, "Test Account #1")
|
34
|
-
set_textfield_by_name(browser, /Phone/, "415-333-2311")
|
35
|
-
|
36
|
-
test_account_lookup(browser) #In Project Util
|
37
|
-
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
38
|
-
select_option_by_name_and_option_text(browser, /Account Type/, "Analyst")
|
39
|
-
select_option_by_name_and_option_text(browser, /Industry/, "ASP")
|
40
|
-
set_textfield_by_name(browser, /Billing Street/, "201 Main St")
|
41
|
-
set_textfield_by_name(browser, /Billing City/, "San Francisco")
|
42
|
-
set_textfield_by_name(browser, /Billing State/, "CA")
|
43
|
-
set_textfield_by_name(browser, /Billing Code/, "94102")
|
44
|
-
set_textfield_by_name(browser, /Billing Country/, "USA")
|
45
|
-
#browser.cell(:text, 'Billing to Shipping').click
|
46
|
-
click(browser, :cell, :text, 'Billing to Shipping')
|
47
|
-
click_button_by_value(browser, 'Save')
|
48
|
-
|
49
|
-
wait_until_by_text(browser, 'Test Account #1')
|
50
|
-
validate_text(browser, "Test Account #1")
|
51
|
-
validate_text(browser, "random")
|
52
|
-
end
|
53
|
-
|
54
|
-
def test_account_lookup(browser)
|
55
|
-
mark_testlevel('Account Lookup', 1)
|
56
|
-
click(browser, :image, :title, 'Account Name Lookup')
|
57
|
-
sleep_for(5)
|
58
|
-
popup = attach_browser_by_url(browser, /Parent Account/)
|
59
|
-
set_textfield_by_name(popup, 'fldValue', 'test account #00')
|
60
|
-
click_button_by_value(popup, 'Go')
|
61
|
-
click(popup, :link, :text, 'Test Account #007')
|
62
|
-
# TODO: This next line is currently required for Firefox and Chrome to return to original browser window browser = attach_browser_by_url(browser, /ShowHomePage/)
|
63
|
-
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
64
|
-
validate_textfield_value_by_name(browser, /Parent Account/, 'Test Account #007')
|
65
|
-
end
|
66
|
-
|
67
|
-
|
68
|
-
end
|
1
|
+
#include 'pry'
|
2
|
+
$watir_script = true
|
3
|
+
module CreateZohoAccount1
|
4
|
+
|
5
|
+
def run_test(browser)
|
6
|
+
create_account_scenario_1(browser)
|
7
|
+
create_account_scenario_2(browser)
|
8
|
+
end
|
9
|
+
|
10
|
+
def create_account_scenario_1(browser)
|
11
|
+
create_account(browser)
|
12
|
+
create_blank_new_account(browser)
|
13
|
+
export_accounts(browser)
|
14
|
+
import_accounts(browser)
|
15
|
+
signout(browser)
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_account_scenario_2(browser)
|
19
|
+
create_blank_new_account(browser)
|
20
|
+
reports(browser)
|
21
|
+
clone_account(browser)
|
22
|
+
pagination(browser)
|
23
|
+
verify_accounts(browser)
|
24
|
+
search_accounts(browser)
|
25
|
+
signout(browser)
|
26
|
+
end
|
27
|
+
|
28
|
+
def create_account(browser)
|
29
|
+
mark_testlevel('Create New Account', 1)
|
30
|
+
sleep_for(3)
|
31
|
+
click(browser, :link, :text, 'New Account')
|
32
|
+
wait_until_ready(browser, :name, /Account Name/)
|
33
|
+
set_textfield_by_name(browser, /Account Name/, "Test Account #1")
|
34
|
+
set_textfield_by_name(browser, /Phone/, "415-333-2311")
|
35
|
+
|
36
|
+
test_account_lookup(browser) #In Project Util
|
37
|
+
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
38
|
+
select_option_by_name_and_option_text(browser, /Account Type/, "Analyst")
|
39
|
+
select_option_by_name_and_option_text(browser, /Industry/, "ASP")
|
40
|
+
set_textfield_by_name(browser, /Billing Street/, "201 Main St")
|
41
|
+
set_textfield_by_name(browser, /Billing City/, "San Francisco")
|
42
|
+
set_textfield_by_name(browser, /Billing State/, "CA")
|
43
|
+
set_textfield_by_name(browser, /Billing Code/, "94102")
|
44
|
+
set_textfield_by_name(browser, /Billing Country/, "USA")
|
45
|
+
#browser.cell(:text, 'Billing to Shipping').click
|
46
|
+
click(browser, :cell, :text, 'Billing to Shipping')
|
47
|
+
click_button_by_value(browser, 'Save')
|
48
|
+
|
49
|
+
wait_until_by_text(browser, 'Test Account #1')
|
50
|
+
validate_text(browser, "Test Account #1")
|
51
|
+
validate_text(browser, "random")
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_account_lookup(browser)
|
55
|
+
mark_testlevel('Account Lookup', 1)
|
56
|
+
click(browser, :image, :title, 'Account Name Lookup')
|
57
|
+
sleep_for(5)
|
58
|
+
popup = attach_browser_by_url(browser, /Parent Account/)
|
59
|
+
set_textfield_by_name(popup, 'fldValue', 'test account #00')
|
60
|
+
click_button_by_value(popup, 'Go')
|
61
|
+
click(popup, :link, :text, 'Test Account #007')
|
62
|
+
# TODO: This next line is currently required for Firefox and Chrome to return to original browser window browser = attach_browser_by_url(browser, /ShowHomePage/)
|
63
|
+
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
64
|
+
validate_textfield_value_by_name(browser, /Parent Account/, 'Test Account #007')
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
end
|
@@ -1,72 +1,72 @@
|
|
1
|
-
$watir_script = true
|
2
|
-
module CreateZohoAccount2
|
3
|
-
|
4
|
-
def run_test(browser)
|
5
|
-
create_account_scenario_1(browser)
|
6
|
-
create_account_scenario_2(browser)
|
7
|
-
end
|
8
|
-
|
9
|
-
def create_account_scenario_1(browser)
|
10
|
-
mark_testlevel("#{__method__.to_s.titleize}", 1)
|
11
|
-
create_account(browser)
|
12
|
-
create_blank_new_account(browser)
|
13
|
-
export_accounts(browser)
|
14
|
-
import_accounts(browser)
|
15
|
-
signout(browser)
|
16
|
-
end
|
17
|
-
|
18
|
-
def create_account_scenario_2(browser)
|
19
|
-
mark_testlevel("#{__method__.to_s.titleize}", 1)
|
20
|
-
create_blank_new_account(browser)
|
21
|
-
reports(browser)
|
22
|
-
clone_account(browser)
|
23
|
-
pagination(browser)
|
24
|
-
verify_accounts(browser)
|
25
|
-
search_accounts(browser)
|
26
|
-
signout(browser)
|
27
|
-
end
|
28
|
-
|
29
|
-
def create_account(browser)
|
30
|
-
mark_testlevel("#{__method__.to_s.titleize}", 1)
|
31
|
-
sleep_for(3)
|
32
|
-
click_text(browser, 'New Account')
|
33
|
-
wait_until_ready(browser, :name, /Account Name/)
|
34
|
-
set_textfield_by_name(browser, /Account Name/, @var['account_name'], "*** cza007 ***")
|
35
|
-
set_textfield_by_name(browser, /Phone/, @var['account_phone'], "*** cza007 ***")
|
36
|
-
|
37
|
-
test_account_lookup(browser)
|
38
|
-
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
39
|
-
|
40
|
-
select_option_by_name_and_option_text(browser, /Account Type/, @var['account_type'], "*** cza003a ***")
|
41
|
-
select_option_by_name_and_option_text(browser, /Industry/, @var['account_industry'], "*** cza003b ***")
|
42
|
-
set_textfield_by_name(browser, /Billing Street/, @var['account_billing_street'], "*** cza003c ***")
|
43
|
-
set_textfield_by_name(browser, /Billing City/, @var['account_billing_city'], "*** cza003d ***")
|
44
|
-
set_textfield_by_name(browser, /Billing State/, @var['account_billing_state'], "*** cza003e ***")
|
45
|
-
set_textfield_by_name(browser, /Billing Code/, @var['account_billing_zipcode'], "*** cza003f ***")
|
46
|
-
set_textfield_by_name(browser, /Billing Country/, @var['account_country'], "*** cza003g ***")
|
47
|
-
|
48
|
-
#browser.cell(:text, 'Billing to Shipping').click
|
49
|
-
click(browser, :cell, :text, 'Billing to Shipping', "*** cza004 ***")
|
50
|
-
click_button_by_value(browser, 'Save')
|
51
|
-
|
52
|
-
wait_until_by_text(browser, @var['account_name'])
|
53
|
-
validate_text(browser, @var['account_name'], "*** cza005 ***")
|
54
|
-
validate_text(browser, "random", "*** cza006 ***")
|
55
|
-
end
|
56
|
-
|
57
|
-
def test_account_lookup(browser)
|
58
|
-
mark_testlevel("#{__method__.to_s.titleize}", 1)
|
59
|
-
click(browser, :image, :title, 'Account Name Lookup')
|
60
|
-
#sleep_for(5)
|
61
|
-
popup = attach_browser_by_url(browser, /Parent Account/, "*** cza001 ***")
|
62
|
-
if popup
|
63
|
-
set_textfield_by_name(popup, 'fldValue', @var['parent_account_pattern'])
|
64
|
-
click_button_by_value(popup, 'Go')
|
65
|
-
click(popup, :link, :text, @var['parent_account'])
|
66
|
-
# TODO: This next line is currently required for Firefox and Chrome to return to original browser window
|
67
|
-
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
68
|
-
validate_textfield_value_by_name(browser, /Parent Account/, @var['parent_account'], "*** cza002 ***")
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
end
|
1
|
+
$watir_script = true
|
2
|
+
module CreateZohoAccount2
|
3
|
+
|
4
|
+
def run_test(browser)
|
5
|
+
create_account_scenario_1(browser)
|
6
|
+
create_account_scenario_2(browser)
|
7
|
+
end
|
8
|
+
|
9
|
+
def create_account_scenario_1(browser)
|
10
|
+
mark_testlevel("#{__method__.to_s.titleize}", 1)
|
11
|
+
create_account(browser)
|
12
|
+
create_blank_new_account(browser)
|
13
|
+
export_accounts(browser)
|
14
|
+
import_accounts(browser)
|
15
|
+
signout(browser)
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_account_scenario_2(browser)
|
19
|
+
mark_testlevel("#{__method__.to_s.titleize}", 1)
|
20
|
+
create_blank_new_account(browser)
|
21
|
+
reports(browser)
|
22
|
+
clone_account(browser)
|
23
|
+
pagination(browser)
|
24
|
+
verify_accounts(browser)
|
25
|
+
search_accounts(browser)
|
26
|
+
signout(browser)
|
27
|
+
end
|
28
|
+
|
29
|
+
def create_account(browser)
|
30
|
+
mark_testlevel("#{__method__.to_s.titleize}", 1)
|
31
|
+
sleep_for(3)
|
32
|
+
click_text(browser, 'New Account')
|
33
|
+
wait_until_ready(browser, :name, /Account Name/)
|
34
|
+
set_textfield_by_name(browser, /Account Name/, @var['account_name'], "*** cza007 ***")
|
35
|
+
set_textfield_by_name(browser, /Phone/, @var['account_phone'], "*** cza007 ***")
|
36
|
+
|
37
|
+
test_account_lookup(browser)
|
38
|
+
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
39
|
+
|
40
|
+
select_option_by_name_and_option_text(browser, /Account Type/, @var['account_type'], "*** cza003a ***")
|
41
|
+
select_option_by_name_and_option_text(browser, /Industry/, @var['account_industry'], "*** cza003b ***")
|
42
|
+
set_textfield_by_name(browser, /Billing Street/, @var['account_billing_street'], "*** cza003c ***")
|
43
|
+
set_textfield_by_name(browser, /Billing City/, @var['account_billing_city'], "*** cza003d ***")
|
44
|
+
set_textfield_by_name(browser, /Billing State/, @var['account_billing_state'], "*** cza003e ***")
|
45
|
+
set_textfield_by_name(browser, /Billing Code/, @var['account_billing_zipcode'], "*** cza003f ***")
|
46
|
+
set_textfield_by_name(browser, /Billing Country/, @var['account_country'], "*** cza003g ***")
|
47
|
+
|
48
|
+
#browser.cell(:text, 'Billing to Shipping').click
|
49
|
+
click(browser, :cell, :text, 'Billing to Shipping', "*** cza004 ***")
|
50
|
+
click_button_by_value(browser, 'Save')
|
51
|
+
|
52
|
+
wait_until_by_text(browser, @var['account_name'])
|
53
|
+
validate_text(browser, @var['account_name'], "*** cza005 ***")
|
54
|
+
validate_text(browser, "random", "*** cza006 ***")
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_account_lookup(browser)
|
58
|
+
mark_testlevel("#{__method__.to_s.titleize}", 1)
|
59
|
+
click(browser, :image, :title, 'Account Name Lookup')
|
60
|
+
#sleep_for(5)
|
61
|
+
popup = attach_browser_by_url(browser, /Parent Account/, "*** cza001 ***")
|
62
|
+
if popup
|
63
|
+
set_textfield_by_name(popup, 'fldValue', @var['parent_account_pattern'])
|
64
|
+
click_button_by_value(popup, 'Go')
|
65
|
+
click(popup, :link, :text, @var['parent_account'])
|
66
|
+
# TODO: This next line is currently required for Firefox and Chrome to return to original browser window
|
67
|
+
browser = attach_browser_by_url(browser, /ShowHomePage/)
|
68
|
+
validate_textfield_value_by_name(browser, /Parent Account/, @var['parent_account'], "*** cza002 ***")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|