awetestlib 0.1.28 → 0.1.29pre1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. data/.gitattributes +22 -22
  2. data/.gitignore +69 -69
  3. data/.yardopts +7 -7
  4. data/README.md +108 -108
  5. data/awetestlib.gemspec +57 -57
  6. data/awetestlib.windows.gemspec +41 -41
  7. data/awetestlib_notes.txt +4 -4
  8. data/awetestlib_osx.gemspec +47 -48
  9. data/bin/awetestlib +99 -99
  10. data/bin/awetestlib-android-setup.rb +26 -26
  11. data/bin/awetestlib-cucumber-setup.rb +28 -28
  12. data/bin/awetestlib-driver-setup.rb +21 -21
  13. data/bin/awetestlib-helpers.rb +41 -41
  14. data/bin/awetestlib-mobile-app-setup.rb +31 -31
  15. data/bin/awetestlib-netbeans-setup.rb +58 -58
  16. data/bin/awetestlib-regression-setup.rb +15 -15
  17. data/bin/awetestlib-rubymine-setup.rb +39 -39
  18. data/drivers/chromedriver.exe +0 -0
  19. data/ext/Rakefile +1 -1
  20. data/ext/mkrf_conf.rb +27 -27
  21. data/lib/awetestlib/html_report.rb +142 -142
  22. data/lib/awetestlib/logging.rb +366 -366
  23. data/lib/awetestlib/regression/browser.rb +1380 -1375
  24. data/lib/awetestlib/regression/drag_and_drop.rb +421 -420
  25. data/lib/awetestlib/regression/find.rb +345 -345
  26. data/lib/awetestlib/regression/legacy.rb +1187 -1187
  27. data/lib/awetestlib/regression/page_data.rb +191 -191
  28. data/lib/awetestlib/regression/runner.rb +307 -307
  29. data/lib/awetestlib/regression/tables.rb +627 -619
  30. data/lib/awetestlib/regression/user_input.rb +576 -576
  31. data/lib/awetestlib/regression/utilities.rb +1046 -988
  32. data/lib/awetestlib/regression/validations.rb +1093 -1074
  33. data/lib/awetestlib/regression/waits.rb +470 -470
  34. data/lib/awetestlib/runner.rb +18 -18
  35. data/lib/awetestlib.rb +41 -41
  36. data/lib/patches/README +2 -2
  37. data/lib/patches/firewatir.rb +106 -106
  38. data/lib/patches/watir.rb +175 -175
  39. data/lib/version.rb +2 -2
  40. data/license.txt +13 -13
  41. data/netbeans_setup.md +29 -29
  42. data/rdoc_test.bat +1 -1
  43. data/rubymine_setup.md +23 -23
  44. data/setup_samples/sample_android/features/dk.mejer.hansen.control.FlyingColorsPlayerAidActivity.apk +0 -0
  45. data/setup_samples/sample_android/features/sample_android.feature +5 -5
  46. data/setup_samples/sample_android/features/step_definitions/calabash_steps.rb +1 -1
  47. data/setup_samples/sample_android/features/support/app_installation_hooks.rb +36 -36
  48. data/setup_samples/sample_android/features/support/app_life_cycle_hooks.rb +14 -14
  49. data/setup_samples/sample_android/features/test_servers/8ba795a0288381ae346b67867b586881_0.3.2.apk +0 -0
  50. data/setup_samples/sample_cucumber/features/step_definitions/predefined_steps.rb +76 -76
  51. data/setup_samples/sample_cucumber/features/yahoo_mail.feature +11 -11
  52. data/setup_samples/sample_mobile_app/features/my_first.feature +14 -14
  53. data/setup_samples/sample_mobile_app/features/step_definitions/predefined_webview_steps.rb +80 -80
  54. data/setup_samples/sample_mobile_app/features/support/env.rb +2 -2
  55. data/setup_samples/sample_netbeans/demo.rb +86 -86
  56. data/setup_samples/sample_netbeans/nbproject/configs/Demo.properties +2 -2
  57. data/setup_samples/sample_netbeans/nbproject/private/config.properties +1 -1
  58. data/setup_samples/sample_netbeans/nbproject/private/configs/Demo.properties +2 -2
  59. data/setup_samples/sample_netbeans/nbproject/private/private.properties +2 -2
  60. data/setup_samples/sample_netbeans/nbproject/project.properties +5 -5
  61. data/setup_samples/sample_netbeans/nbproject/project.xml +13 -13
  62. data/setup_samples/sample_rubymine/.idea/encodings.xml +5 -5
  63. data/setup_samples/sample_rubymine/.idea/misc.xml +5 -5
  64. data/setup_samples/sample_rubymine/.idea/modules.xml +9 -9
  65. data/setup_samples/sample_rubymine/.idea/sample_rubymine.iml +9 -9
  66. data/setup_samples/sample_rubymine/.idea/scopes/scope_settings.xml +4 -4
  67. data/setup_samples/sample_rubymine/.idea/vcs.xml +7 -7
  68. data/setup_samples/sample_rubymine/.idea/workspace.xml +213 -213
  69. data/setup_samples/sample_rubymine/demo.rb +86 -86
  70. data/test/create_zoho.rb +66 -66
  71. data/test/create_zoho_account1.rb +68 -68
  72. data/test/create_zoho_account2.rb +72 -72
  73. data/test/demo.rb +87 -87
  74. data/test/google_search1.rb +16 -16
  75. data/test/google_search2.rb +19 -19
  76. data/test/login_1.rb +37 -37
  77. data/test/login_1a.rb +37 -37
  78. data/test/login_2.rb +32 -32
  79. data/test/zoho_exercise.rb +21 -21
  80. data/test/zoho_util.rb +487 -487
  81. data/tmp/placeholder.html +71 -71
  82. metadata +18 -49
@@ -1,76 +1,76 @@
1
- When /^I open a new browser$/ do
2
- if @params
3
- case @params["browser"]
4
- when "FF"; @browser = Watir::Browser.new :firefox
5
- when "IE"; @browser = Watir::Browser.new :ie
6
- when "C", "GC"; @browser = Watir::Browser.new :chrome
7
- end
8
- else
9
- @browser = Watir::Browser.new
10
- end
11
- end
12
-
13
- Given /^I open a firefox browser$/ do
14
- @browser = Watir::Browser.new :firefox
15
- end
16
-
17
- Given /^I open a chrome browser$/ do
18
- @browser = Watir::Browser.new :chrome
19
- end
20
-
21
- Given /^I open an internet explorer browser$/ do
22
- @browser = Watir::Browser.new :ie
23
- end
24
-
25
- Then /^I navigate to the environment url$/ do
26
- url = @params['environment']['url']
27
- @browser.goto url
28
- end
29
-
30
- Then /^I go to the url "(.*?)"$/ do |url|
31
- @browser.goto url
32
- end
33
-
34
- Then /^I click "(.*?)"$/ do |element_text|
35
- sleep 1
36
- @browser.element(:text, element_text).click
37
- end
38
-
39
- Then /^I click the button "(.*?)"$/ do |element_text|
40
- sleep 1
41
- @browser.button(:text, element_text).click
42
- end
43
-
44
- Then /^I click the element with "(.*?)" "(.*?)"$/ do |arg1, arg2|
45
- @browser.element(arg1.to_sym, arg2)
46
- end
47
-
48
- Then /^I should see "(.*?)"$/ do |text|
49
- sleep 1
50
- stm = @browser.text.include? text
51
- if stm
52
- true
53
- else
54
- fail("Did not find text #{text}")
55
- end
56
- end
57
-
58
- Then /^I should not see "(.*?)"$/ do |text|
59
- stm = @browser.text.include? text
60
- if stm
61
- fail("Found text #{text}")
62
- else
63
- true
64
- end
65
- end
66
-
67
- Then /^I fill in "(.*?)" with "(.*?)"$/ do |field, value| #assumes u have label
68
- associated_label = @browser.label(:text, field).attribute_value("for")
69
- #associated_label = @browser.element(:xpath, '//label[contains(text(),"#{arg1}")]').attribute_value("for"))
70
- @browser.text_field(:id, associated_label).set value
71
- end
72
-
73
-
74
- When /^I wait (\d+) seconds?$/ do |seconds|
75
- sleep seconds.to_i
76
- end
1
+ When /^I open a new browser$/ do
2
+ if @params
3
+ case @params["browser"]
4
+ when "FF"; @browser = Watir::Browser.new :firefox
5
+ when "IE"; @browser = Watir::Browser.new :ie
6
+ when "C", "GC"; @browser = Watir::Browser.new :chrome
7
+ end
8
+ else
9
+ @browser = Watir::Browser.new
10
+ end
11
+ end
12
+
13
+ Given /^I open a firefox browser$/ do
14
+ @browser = Watir::Browser.new :firefox
15
+ end
16
+
17
+ Given /^I open a chrome browser$/ do
18
+ @browser = Watir::Browser.new :chrome
19
+ end
20
+
21
+ Given /^I open an internet explorer browser$/ do
22
+ @browser = Watir::Browser.new :ie
23
+ end
24
+
25
+ Then /^I navigate to the environment url$/ do
26
+ url = @params['environment']['url']
27
+ @browser.goto url
28
+ end
29
+
30
+ Then /^I go to the url "(.*?)"$/ do |url|
31
+ @browser.goto url
32
+ end
33
+
34
+ Then /^I click "(.*?)"$/ do |element_text|
35
+ sleep 1
36
+ @browser.element(:text, element_text).click
37
+ end
38
+
39
+ Then /^I click the button "(.*?)"$/ do |element_text|
40
+ sleep 1
41
+ @browser.button(:text, element_text).click
42
+ end
43
+
44
+ Then /^I click the element with "(.*?)" "(.*?)"$/ do |arg1, arg2|
45
+ @browser.element(arg1.to_sym, arg2)
46
+ end
47
+
48
+ Then /^I should see "(.*?)"$/ do |text|
49
+ sleep 1
50
+ stm = @browser.text.include? text
51
+ if stm
52
+ true
53
+ else
54
+ fail("Did not find text #{text}")
55
+ end
56
+ end
57
+
58
+ Then /^I should not see "(.*?)"$/ do |text|
59
+ stm = @browser.text.include? text
60
+ if stm
61
+ fail("Found text #{text}")
62
+ else
63
+ true
64
+ end
65
+ end
66
+
67
+ Then /^I fill in "(.*?)" with "(.*?)"$/ do |field, value| #assumes u have label
68
+ associated_label = @browser.label(:text, field).attribute_value("for")
69
+ #associated_label = @browser.element(:xpath, '//label[contains(text(),"#{arg1}")]').attribute_value("for"))
70
+ @browser.text_field(:id, associated_label).set value
71
+ end
72
+
73
+
74
+ When /^I wait (\d+) seconds?$/ do |seconds|
75
+ sleep seconds.to_i
76
+ end
@@ -1,11 +1,11 @@
1
- Feature:
2
- I want to test cucumber
3
-
4
- Scenario:
5
- When I open a new browser
6
- Then I go to the url "http://mail.yahoo.com"
7
- Then I should see "Sign in to Yahoo!"
8
- When I fill in "Yahoo! ID" with "automationtester88"
9
- Then I fill in "Password" with "password1"
10
- Then I click the button "Sign In"
11
- Then I should see "Invalid ID or password."
1
+ Feature:
2
+ I want to test cucumber
3
+
4
+ Scenario:
5
+ When I open a new browser
6
+ Then I go to the url "http://mail.yahoo.com"
7
+ Then I should see "Sign in to Yahoo!"
8
+ When I fill in "Yahoo! ID" with "automationtester88"
9
+ Then I fill in "Password" with "password1"
10
+ Then I click the button "Sign In"
11
+ Then I should see "Invalid ID or password."
@@ -1,14 +1,14 @@
1
- Feature:
2
- I want to test cucumber
3
-
4
- Scenario:
5
-
6
- When I touch "Number"
7
- Then I should see "Sorted by Atomic Number"
8
- When I touch "Symbol"
9
- Then I should see "Sorted by Atomic Symbol"
10
- When I touch "State"
11
- Then I should see "Grouped by State"
12
-
13
-
14
-
1
+ Feature:
2
+ I want to test cucumber
3
+
4
+ Scenario:
5
+
6
+ When I touch "Number"
7
+ Then I should see "Sorted by Atomic Number"
8
+ When I touch "Symbol"
9
+ Then I should see "Sorted by Atomic Symbol"
10
+ When I touch "State"
11
+ Then I should see "Grouped by State"
12
+
13
+
14
+
@@ -1,80 +1,80 @@
1
- Then /^let me debug$/ do
2
- binding.pry
3
- end
4
-
5
- Then /^I swipe "(.*?)" from the "(.*?)" label$/ do |dir, ele| #Then I swipe "up" from the "Locations" label
6
- query("view:'UILabel' marked:'#{ele}' first", "swipeInDirection:", dir)
7
- end
8
-
9
- Then /^I use the keyboard to fill in the textfield marked "(.*?)" with "(.*?)"$/ do |text_field_mark, text_to_type|
10
- query( "view marked:'#{text_field_mark}'", 'setText:', text_to_type )
11
- end
12
-
13
- Then /^I touch the switch with index "(.*?)"$/ do |idx| #Then I touch the switch with index "1"
14
- touch("view:'UISwitch' index:#{idx}")
15
- end
16
-
17
- And /I wait (\d+) seconds?/ do |seconds| #Then I wait 3 seconds
18
- sleep(seconds.to_i)
19
- end
20
-
21
- Then /^I type "(.*?)" in the text field with id "(.*?)"$/ do |txt, id|
22
- set_text("webView css:'input' id:'#{id}'", txt)
23
- end
24
-
25
-
26
- Then /^I touch the WebView text "(.*?)"$/ do |txt|
27
- sleep 1
28
- wait_for(10){element_exists("webView css:'a' textContent:'#{txt}'")}
29
- touch("webView css:'a' textContent:'#{txt}'")
30
- end
31
-
32
- Then /^I touch the WebView button "(.*?)"$/ do |txt|
33
- sleep 1
34
- wait_for(10){element_exists("webView css:'input' textContent:'#{txt}'")}
35
- touch("webView css:'input' textContent:'#{txt}'")
36
- end
37
-
38
- Then /^I should see the WebView text "(.*?)"$/ do |txt|
39
- sleep 1
40
- if !query("webView textContent:'#{txt}'").empty?
41
- true
42
- else
43
- fail("Did not find WebView text '#{txt}")
44
- end
45
- end
46
-
47
- Then /^I should not see the WebView text "(.*?)"$/ do |txt|
48
- sleep 1
49
- if query("webView textContent:'#{txt}'").empty?
50
- true
51
- else
52
- fail("Found WebView text '#{txt}'")
53
- end
54
- end
55
-
56
- Then /^I touch the WebView button with value "(.*?)"$/ do |val|
57
- wait_for(10){element_exists("webView css:'input' value:'#{val}'")}
58
- touch("webView css:'input' value:'#{val}'")
59
- end
60
-
61
- When /^I touch the WebView link with index "(.*?)"$/ do |idx|
62
- wait_for(10){element_exists("webView css:'a' index:#{idx}")}
63
- touch("webView css:'a' index:#{idx}")
64
- end
65
-
66
- def send_command ( command )
67
- %x{osascript<<APPLESCRIPT
68
- tell application "System Events"
69
- tell application "iPhone Simulator" to activate
70
- keystroke "#{command}"
71
- delay 1
72
- key code 36
73
- end tell
74
- APPLESCRIPT}
75
- end
76
-
77
- When /^I send the command "([^\\"]*)"$/ do |cmd|
78
- send_command(cmd)
79
- end
80
-
1
+ Then /^let me debug$/ do
2
+ binding.pry
3
+ end
4
+
5
+ Then /^I swipe "(.*?)" from the "(.*?)" label$/ do |dir, ele| #Then I swipe "up" from the "Locations" label
6
+ query("view:'UILabel' marked:'#{ele}' first", "swipeInDirection:", dir)
7
+ end
8
+
9
+ Then /^I use the keyboard to fill in the textfield marked "(.*?)" with "(.*?)"$/ do |text_field_mark, text_to_type|
10
+ query( "view marked:'#{text_field_mark}'", 'setText:', text_to_type )
11
+ end
12
+
13
+ Then /^I touch the switch with index "(.*?)"$/ do |idx| #Then I touch the switch with index "1"
14
+ touch("view:'UISwitch' index:#{idx}")
15
+ end
16
+
17
+ And /I wait (\d+) seconds?/ do |seconds| #Then I wait 3 seconds
18
+ sleep(seconds.to_i)
19
+ end
20
+
21
+ Then /^I type "(.*?)" in the text field with id "(.*?)"$/ do |txt, id|
22
+ set_text("webView css:'input' id:'#{id}'", txt)
23
+ end
24
+
25
+
26
+ Then /^I touch the WebView text "(.*?)"$/ do |txt|
27
+ sleep 1
28
+ wait_for(10){element_exists("webView css:'a' textContent:'#{txt}'")}
29
+ touch("webView css:'a' textContent:'#{txt}'")
30
+ end
31
+
32
+ Then /^I touch the WebView button "(.*?)"$/ do |txt|
33
+ sleep 1
34
+ wait_for(10){element_exists("webView css:'input' textContent:'#{txt}'")}
35
+ touch("webView css:'input' textContent:'#{txt}'")
36
+ end
37
+
38
+ Then /^I should see the WebView text "(.*?)"$/ do |txt|
39
+ sleep 1
40
+ if !query("webView textContent:'#{txt}'").empty?
41
+ true
42
+ else
43
+ fail("Did not find WebView text '#{txt}")
44
+ end
45
+ end
46
+
47
+ Then /^I should not see the WebView text "(.*?)"$/ do |txt|
48
+ sleep 1
49
+ if query("webView textContent:'#{txt}'").empty?
50
+ true
51
+ else
52
+ fail("Found WebView text '#{txt}'")
53
+ end
54
+ end
55
+
56
+ Then /^I touch the WebView button with value "(.*?)"$/ do |val|
57
+ wait_for(10){element_exists("webView css:'input' value:'#{val}'")}
58
+ touch("webView css:'input' value:'#{val}'")
59
+ end
60
+
61
+ When /^I touch the WebView link with index "(.*?)"$/ do |idx|
62
+ wait_for(10){element_exists("webView css:'a' index:#{idx}")}
63
+ touch("webView css:'a' index:#{idx}")
64
+ end
65
+
66
+ def send_command ( command )
67
+ %x{osascript<<APPLESCRIPT
68
+ tell application "System Events"
69
+ tell application "iPhone Simulator" to activate
70
+ keystroke "#{command}"
71
+ delay 1
72
+ key code 36
73
+ end tell
74
+ APPLESCRIPT}
75
+ end
76
+
77
+ When /^I send the command "([^\\"]*)"$/ do |cmd|
78
+ send_command(cmd)
79
+ end
80
+
@@ -1,3 +1,3 @@
1
- require 'calabash-cucumber/cucumber'
2
- require 'calabash-cucumber/calabash_steps'
1
+ require 'calabash-cucumber/cucumber'
2
+ require 'calabash-cucumber/calabash_steps'
3
3
  require 'pry'
@@ -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
@@ -1,2 +1,2 @@
1
- main.file=awetestlib
2
- ruby.options=-rubygems
1
+ main.file=awetestlib
2
+ ruby.options=-rubygems
@@ -1 +1 @@
1
- config=Demo
1
+ config=Demo
@@ -1,2 +1,2 @@
1
- application.args=SAMPLE-SCRIPT -b FF
2
- work.dir=WORK-DIR
1
+ application.args=SAMPLE-SCRIPT -b FF
2
+ work.dir=WORK-DIR
@@ -1,2 +1,2 @@
1
- file.reference.Ruby187-bin=BIN-DIR
2
- platform.active=Ruby
1
+ file.reference.Ruby187-bin=BIN-DIR
2
+ platform.active=Ruby
@@ -1,5 +1,5 @@
1
- javac.classpath=
2
- main.file=
3
- platform.active=Ruby
4
- source.encoding=UTF-8
5
- src.dir=${file.reference.Ruby187-bin}
1
+ javac.classpath=
2
+ main.file=
3
+ platform.active=Ruby
4
+ source.encoding=UTF-8
5
+ src.dir=${file.reference.Ruby187-bin}
@@ -1,13 +1,13 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project xmlns="http://www.netbeans.org/ns/project/1">
3
- <type>org.netbeans.modules.ruby.rubyproject</type>
4
- <configuration>
5
- <data xmlns="http://www.netbeans.org/ns/ruby-project/1">
6
- <name>PROJECT-NAME</name>
7
- <source-roots>
8
- <root id="src.dir"/>
9
- </source-roots>
10
- <test-roots/>
11
- </data>
12
- </configuration>
13
- </project>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://www.netbeans.org/ns/project/1">
3
+ <type>org.netbeans.modules.ruby.rubyproject</type>
4
+ <configuration>
5
+ <data xmlns="http://www.netbeans.org/ns/ruby-project/1">
6
+ <name>PROJECT-NAME</name>
7
+ <source-roots>
8
+ <root id="src.dir"/>
9
+ </source-roots>
10
+ <test-roots/>
11
+ </data>
12
+ </configuration>
13
+ </project>
@@ -1,5 +1,5 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
- </project>
5
-
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
+ </project>
5
+
@@ -1,5 +1,5 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" project-jdk-name="ruby-1.8.7-p352" project-jdk-type="RUBY_SDK" />
4
- </project>
5
-
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="ruby-1.8.7-p352" project-jdk-type="RUBY_SDK" />
4
+ </project>
5
+
@@ -1,9 +1,9 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/sample_rubymine.iml" filepath="$PROJECT_DIR$/.idea/sample_rubymine.iml" />
6
- </modules>
7
- </component>
8
- </project>
9
-
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/sample_rubymine.iml" filepath="$PROJECT_DIR$/.idea/sample_rubymine.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
9
+