Ifd_Automation 3.0.2 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e93c46f8a7695b85679c5c979a23b877fdf6bc1d8233e2fe1b74bf0c4ce9c29
4
- data.tar.gz: 378205b56f9eeafb21cf16ae0943ff569db4746757815ee88f5b3844658cc76b
3
+ metadata.gz: 5676a0c033c414a1ffeceabbe806bdc63fd9747b7c8081ffd2a6187e6028132e
4
+ data.tar.gz: f38b31c843b9be758887ad32e6890c6bb4a97b842e8181b0b7f4d07a54118c99
5
5
  SHA512:
6
- metadata.gz: ae91536844167f9976a8437f82ee34da8bb9e7c90cf2dd0d659b90bfb7dd27dd9db24401148aedc58aa2d7ec60f5b6075f25bb3a61f78e393d8d412ee872684b
7
- data.tar.gz: a8b5946cb00566e404f6d9b957e6a7e23cc4b4437a24c5e1461dc91f86fecdcc1b58e6a0d70dc45170e0b6b1e3114d0aa13c7085d71a04fdbf2c78e4212c0dcf
6
+ metadata.gz: 82445486742bb0daf813bc9bc6f25cc075d4e38e58270508b6f296fce8aee6f6e375334787842964c54bfa2e4fcd4938ee82f9e80394d3f0a653dfbc0bf1cb8c
7
+ data.tar.gz: 99530d845d61898e5d027cfe2164866ed4dfd19dc5a74f0d24b29053628d8c12f1ee1f96ff74f22e49bb39f20fe17761607dcfd89491f11f58a8727d6296d29d
@@ -22,7 +22,8 @@ def reg_compare sActual, regValue, isSpecialChar=false
22
22
  regValue = regValue.strip.gsub("[", "\\[").gsub("]", "\\]").gsub("(", "\\(").gsub(")", "\\)").gsub(">", "\\>")
23
23
  end
24
24
  rescue StandardError => myStandardError
25
- raise "\n>>> Error: #{myStandardError}"
25
+ puts "❌ ERROR #{myStandardError}"
26
+ exit(1)
26
27
  end
27
28
 
28
29
  # put_log "\nsActual:#{sActual}, regValue:#{regValue}"
@@ -1,3 +1,3 @@
1
1
  module IfdAutomation
2
- VERSION = "3.0.2"
2
+ VERSION = "3.0.3"
3
3
  end
@@ -1,8 +1,8 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- Ifd_Automation (2.9.9)
5
- capybara (~> 2.7, >= 2.7.1)
4
+ Ifd_Automation (3.0.2)
5
+ capybara (~> 3.29.0)
6
6
  cucumber (~> 3.1)
7
7
  cucumber_priority (~> 0.3.2)
8
8
  httparty (~> 0.15.6)
@@ -10,25 +10,25 @@ GEM
10
10
  net-ssh (~> 3.2)
11
11
  parallel_tests (~> 2.7, >= 2.7.1)
12
12
  report_builder (~> 1.8, >= 1.8)
13
- rspec (~> 3.8.0)
13
+ rspec (~> 3.8, >= 3.8.0)
14
14
  savon (~> 2.11, >= 2.11.1)
15
15
  selenium-webdriver (~> 3.6, >= 3.6.0)
16
- addressable (2.6.0)
17
- public_suffix (>= 2.0.2, < 4.0)
16
+ addressable (2.7.0)
17
+ public_suffix (>= 2.0.2, < 5.0)
18
18
  akami (1.3.1)
19
19
  gyoku (>= 0.4.0)
20
20
  nokogiri
21
- backports (3.13.0)
21
+ backports (3.15.0)
22
22
  builder (3.2.3)
23
- capybara (2.18.0)
23
+ capybara (3.29.0)
24
24
  addressable
25
25
  mini_mime (>= 0.1.3)
26
- nokogiri (>= 1.3.3)
27
- rack (>= 1.0.0)
28
- rack-test (>= 0.5.4)
29
- xpath (>= 2.0, < 4.0)
30
- childprocess (0.9.0)
31
- ffi (~> 1.0, >= 1.0.11)
26
+ nokogiri (~> 1.8)
27
+ rack (>= 1.6.0)
28
+ rack-test (>= 0.6.3)
29
+ regexp_parser (~> 1.5)
30
+ xpath (~> 3.2)
31
+ childprocess (3.0.0)
32
32
  cucumber (3.1.2)
33
33
  builder (>= 2.1.2)
34
34
  cucumber-core (~> 3.2.0)
@@ -48,7 +48,6 @@ GEM
48
48
  cucumber_priority (0.3.2)
49
49
  cucumber
50
50
  diff-lcs (1.3)
51
- ffi (1.10.0)
52
51
  fivemat (1.3.7)
53
52
  gherkin (5.1.0)
54
53
  gyoku (1.3.1)
@@ -61,38 +60,39 @@ GEM
61
60
  json (2.2.0)
62
61
  jsonpath (0.5.8)
63
62
  multi_json
64
- mini_mime (1.0.1)
63
+ mini_mime (1.0.2)
65
64
  mini_portile2 (2.4.0)
66
- multi_json (1.13.1)
65
+ multi_json (1.14.0)
67
66
  multi_test (0.1.2)
68
67
  multi_xml (0.6.0)
69
68
  net-ssh (3.2.0)
70
- nokogiri (1.10.3)
69
+ nokogiri (1.10.4)
71
70
  mini_portile2 (~> 2.4.0)
72
71
  nori (2.6.0)
73
- parallel (1.17.0)
74
- parallel_tests (2.29.0)
72
+ parallel (1.18.0)
73
+ parallel_tests (2.29.2)
75
74
  parallel
76
- public_suffix (3.0.3)
75
+ public_suffix (4.0.1)
77
76
  rack (2.0.7)
78
77
  rack-test (1.1.0)
79
78
  rack (>= 1.0, < 3)
79
+ regexp_parser (1.6.0)
80
80
  report_builder (1.8)
81
81
  json (>= 1.8.1)
82
- rspec (3.8.0)
83
- rspec-core (~> 3.8.0)
84
- rspec-expectations (~> 3.8.0)
85
- rspec-mocks (~> 3.8.0)
86
- rspec-core (3.8.0)
87
- rspec-support (~> 3.8.0)
88
- rspec-expectations (3.8.2)
82
+ rspec (3.9.0)
83
+ rspec-core (~> 3.9.0)
84
+ rspec-expectations (~> 3.9.0)
85
+ rspec-mocks (~> 3.9.0)
86
+ rspec-core (3.9.0)
87
+ rspec-support (~> 3.9.0)
88
+ rspec-expectations (3.9.0)
89
89
  diff-lcs (>= 1.2.0, < 2.0)
90
- rspec-support (~> 3.8.0)
91
- rspec-mocks (3.8.0)
90
+ rspec-support (~> 3.9.0)
91
+ rspec-mocks (3.9.0)
92
92
  diff-lcs (>= 1.2.0, < 2.0)
93
- rspec-support (~> 3.8.0)
94
- rspec-support (3.8.0)
95
- rubyzip (1.2.2)
93
+ rspec-support (~> 3.9.0)
94
+ rspec-support (3.9.0)
95
+ rubyzip (2.0.0)
96
96
  savon (2.12.0)
97
97
  akami (~> 1.2)
98
98
  builder (>= 2.1.2)
@@ -101,9 +101,9 @@ GEM
101
101
  nokogiri (>= 1.8.1)
102
102
  nori (~> 2.4)
103
103
  wasabi (~> 3.4)
104
- selenium-webdriver (3.141.0)
105
- childprocess (~> 0.5)
106
- rubyzip (~> 1.2, >= 1.2.2)
104
+ selenium-webdriver (3.142.6)
105
+ childprocess (>= 0.5, < 4.0)
106
+ rubyzip (>= 1.2.2)
107
107
  socksify (1.7.1)
108
108
  wasabi (3.5.0)
109
109
  httpi (~> 2.0)
@@ -0,0 +1,8 @@
1
+ args: ["--start-maximized","--disable-infobars","--incognito", "--user-agent='Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile /9A334 Safari/7534.48.3'"]
2
+ prefs: {
3
+ password_manager_enabled: false,
4
+ default_content_settings: {popups: 0},
5
+ content_settings: {pattern_pairs: {'*': {'multiple-automatic-downloads': 1}}}
6
+ }
7
+ mobileEmulation: {deviceName: "iPhone X"}
8
+ #In backend, args is the name of configuration in table
@@ -0,0 +1 @@
1
+ browser.download.downloadDir: '/home/seluser'
@@ -0,0 +1 @@
1
+ mobileEmulation: {deviceName: "iPhone X"}
@@ -0,0 +1 @@
1
+ mobileEmulation: {deviceName: "iPhone X"}
@@ -1,6 +1,4 @@
1
- @announce
2
- Feature: anhpham test
1
+ Feature: demo
3
2
 
4
3
  Scenario: new scenario
5
- * I open the page "https://frontend.sportpartner-staging.test.infodation.vn/dk"
6
- * Register a new user with age "25" and username "TestIFDSportPartner01" and email "TestIFDSportPartner01@yopmail.com" and password "12345678" and country "Danmark"
4
+ Given I open the page "http://google.com"
@@ -1,14 +1,3 @@
1
1
  And /I open the page "(.*)"/ do |url_site|
2
2
  execute_openbrowser(url_site)
3
3
  end
4
-
5
-
6
- And /Register a new user with age "(.*)" and username "(.*)" and email "(.*)" and password "(.*)" and country "(.*)"$/ do |age, username, email, password, country|
7
- execute_click "sp_signup_menuhomepage"
8
- # sleep 2z
9
- # execute_click "SP_signupbutton"
10
- # execute_click "SP_signup_gotosignuppage"
11
- # execute_click "SP_signup_choose_wanttoplay"
12
- # execute_click "SP_signup_choose_sex"
13
- # execute_click "SP_signup_choose_womanorman"
14
- end
@@ -1,155 +1,2 @@
1
- SP_signupbutton: {xpath_selector: '//li[@class="mm-listitem"]//a[@href="#"][contains(text(),"T")]'}
2
- SP_signupwithemailbutton: {xpath_selector: './/*[@id="sign-up"]//div/a[@class="btn btn-block orangey-red btn-singup btn-singup-email"]'}
3
- SP_signup_choose_wanttoplay: {xpath_selector: '//div[@class="field-panel"]/label[10]/div[1]/label'}
4
- sp_signup_menuhomepage: {xpath_selector: '//a[@class="p-0 btn btn-menu"]'}
5
- SP_signup_choose_womanorman: {xpath_selector: '//div[@class="custom-control custom-radio"]//label[@class="custom-control-label"][contains(text(),"M")]'}
6
- SP_signup_choose_sex: {xpath_selector: './/*[@id="sign-up-new-account"]//label[1]/div/label'}
7
- SP_signup_choose_age: {xpath_selector: './/*[@id="select-age"]/option[11]'}
8
- SP_signup_wherewantoplaysport: {xpath_selector: '//div[@class="select-sport-panel input full-width"]//input[@name="_Address"]'}
9
- SP_signup_gotosignuppage: {xpath_selector: '//a[@class="btn btn-block orangey-red btn-signup btn-singup-email btn-signup-mail"]'}
1
+ signupbutton: {xpath_selector: '//li[@class="mm-listitem"]//a[@href="#"][contains(text(),"T")]'}
10
2
 
11
- SP_signup_screenName: {xpath_selector: './/*[@id="ScreenName"]'}
12
- SP_signup_email: {xpath_selector: './/*[@id="Email"]'}
13
- SP_signup_pass: {xpath_selector: './/*[@id="Password"]'}
14
- SP_signup_createacc: {xpath_selector: '//button[@type="submit"]'}
15
- SP_signup_verifyusercreated: {xpath_selector: './/*[@id="page-sign-up-upload-photo"]/h3'}
16
- SP_login_button: {xpath_selector: './/*[@id="second-menu"]/li[1]/a'}
17
- SP_login_mbbutton: {xpath_selector: '//*[@id="second-menu"]//li[1]/a[1]'}
18
- SP_login_email: {xpath_selector: './/*[@id="Email"]'}
19
- SP_login_pass: {xpath_selector: './/*[@id="Password"]'}
20
- SP_login_clicklogin: {xpath_selector: './/*[@id="form-login-email"]/button'}
21
- SP_login_profiltekst: {xpath_selector: '//textarea[@id="AboutYourself"]'}
22
- SP_login_clicktosaveprofile: {xpath_selector: '//button[@class="btn black-two btn-save-photo"]'}
23
- SP_login_skip-introduction: {xpath_selector: '//a[@class="skip-introduction"]'}
24
- SP_login_menu: {xpath_selector: './/*[@class="container-fluid"]//li/a/span[2]'}
25
- SP_login_menulogged: {xpath_selector: './/*[@class="mm-page mm-slideout"]//a[@class="p-0 btn btn-menu"]'}
26
- SP_login_registermyprofile: {xpath_selector: '//button[contains(text(),"R")]'}
27
- SP_login_successful: {xpath_selector: '//p[@class="font-size-26 m-0 font-family-gilroy font-weight-bold text-white"]'}
28
- SP_login_successfulmb: {xpath_selector: '//h3[@class="title"]'}
29
- SP_login_clickupdateimagebutton: {xpath_selector: '//a[@class="d-block text-color-white opacity-50 font-weight-300"]'}
30
- SP_login_skipstepupdateprofile1: {xpath_selector: '//button[@type="button"]'}
31
- SP_login_skipstepupdateprofile2: {xpath_selector: '//*[@id="next-matches"]'}
32
- SP_login_clickcookie: {xpath_selector: './/*[@id="mm-0"]/div[5]/div/div/div/div/div/div[2]/a[1]'}
33
- SP_login_clickbell: {xpath_selector: ' //span[@class="sport-icons bell"]'}
34
- SP_login_checknotification: {xpath_selector: '//p[@class="m-0"]'}
35
- SP_login_closemenu: {xpath_selector: '//a[@class="mm-btn mm-btn_close mm-navbar__btn"]'}
36
- SP_gettotalnewuser_admin: {xpath_selector: '//body//div[2]//div[2]//div[1]//table[1]//tbody[1]/tr[1]/td[16]/span'}
37
- SP_typememberaccount_admin: {ph_xpath_selector: '//span[.="<ph_value>"]'}
38
- SP_typememberaccount_admin2: {xpath_selector: '//table[@class="table table-user-information"]//span[contains(text(),"N")]'}
39
- SP_typememberaccount_adminP1a: {xpath_selector: '//tr[18]//td[2]//span[1]'}
40
- SP_deleteuser_signinbutton: {xpath_selector: './/*[@class="btn btn-lg btn-primary btn-block btn-signin"]'}
41
- SP_deleteuser_loginbutton: {xpath_selector: '//button[@type="submit"]'}
42
- SP_deleteuser_clickitemuser: {xpath_selector: '//div[@class="sidebar-nav navbar-collapse"]/ul[3]/li/a/i'}
43
- SP_deleteuser_clickitemlookupmemeber: {xpath_selector: '//a[contains(text(),"Lookup Members")]'}
44
- SP_deleteuser_searchuser: {xpath_selector: '//td[3]//kendo-grid-string-filter-cell[1]//kendo-grid-filter-wrapper-cell[1]//input[1]'}
45
- SP_deleteuser_edituser: {css_selector: '//a[contains(text(),"Edit")]'}
46
- SP_deleteuser_deleteuser: {xpath_selector: '//a[contains(text(),"Delete member")]'}
47
- SP_deleteuser_confirmdeleteuser: {xpath_selector: '//button[contains(text(),"Ok")]'}
48
- SP_deleteuser_verifydeleleteuser: {xpath_selector: '//td[@colspan="10"]'}
49
- SP_deleteuser_searchuser1: {xpath_selector: '//input[@class="k-textbox ng-pristine ng-valid ng-touched"]'}
50
-
51
- SP_Matches_profilebuttoninmenu: {xpath_selector: '//a[contains(text(),"Pro")]'}
52
- SP_Matches_matchedbuttoninmenu: {xpath_selector: '//*[@id="main-menu"]/li[1]/a'}
53
- SP_Matches_verifyperson: {xpath_selector: '//div[@id="landing-matches"]//div[1]//div[1]//div[1]//div[1]//div[1]//div[1]//div[1]//div[1]//section[1]//div[1]//div[4]//a'}
54
- SP_Matches_minage: {xpath_selector: './/*[@id="age-range-settings"]/div[2]/div/div[5]'}
55
- SP_Matches_maxage: {xpath_selector: './/*[@id="age-range-settings"]/div[2]/div/div[6]'}
56
- SP_Matches_point1: {xpath_selector: '//div[@class="slider-handle max-slider-handle round"]'}
57
- SP_Matches_point2: {xpath_selector: '//div[@class="slider-handle min-slider-handle round"][contains(text(),"18")]'}
58
-
59
- SP_checkemail_searchemail: {xpath_selector: '//*[@id="f"]//input[2]'}
60
- SP_checkemail_searchemailbtn: {xpath_selector: '//*[@id="f"]//input[1]'}
61
- SP_checkemail_titleemail: {xpath_selector: '//span[@class="lmf"]'}
62
- SP_checkemail_contentemail: {xpath_selector: '//span[@class="lms_m"]'}
63
- SP_checkemail_deleteallemail: {xpath_selector: '//td[7]//a[1]'}
64
- SP_checkemail_refreshallemail: {xpath_selector: '//td[10]//a[1]'}
65
- SP_checkemail_selectallemail: {xpath_selector: '//a[@id="e0"]'}
66
- SP_checkemail_approvebutton: {xpath_selector: '//button[@class="btn btn-success btn-lg"]'}
67
- SP_checkemail_approvestatus: {xpath_selector: '//*[@class="panel-body"]//h5'}
68
- SP_checkemail_approvewithoutsendemailbutton: {xpath_selector: '//*[@class="validate-form ng-untouched ng-pristine ng-invalid"]//div[2]/a'}
69
- SP_checkemail_checkyopmailwithoutemail: {xpath_selector: '//*[@id="msginbox"]//center'}
70
- SP_checkemail_useroption_crsadmin: {xpath_selector: '//div[@class="sidebar-nav navbar-collapse"]/ul[2]/li[1]/a[1]'}
71
- SP_checkemail_searchuseroption_crsadmin: {xpath_selector: '//div[@class="sidebar-nav navbar-collapse"]/ul[2]/li[1]/ul//a[1]'}
72
- SP_premiumuser_premiummenubutton: {xpath_selector: '//a[@class="menu-upgrade-button btn deep-sky-blue go-to-package"]'}
73
- SP_premiumuser_movetopaypage: {xpath_selector: '//button[@type="submit"]'}
74
- SP_premiumuser_visaoption: {xpath_selector: '//*[@id="headingOne"]//label//label'}
75
- SP_premiumuser_Kortnavn: {xpath_selector: '//input[@id="txtName"]'}
76
- SP_premiumuser_Kortnummer: {xpath_selector: './/*[@id="encryptedCardNumber"]'}
77
- SP_premiumuser_Udløbsdatortnavnmm: {xpath_selector: './/*[@id="encryptedExpiryMonth"]'}
78
- SP_premiumuser_Udløbsdatortnavnyy: {xpath_selector: './/*[@id="encryptedExpiryYear"]'}
79
- SP_premiumuser_CVC/CW/CID: {xpath_selector: './/*[@id="encryptedSecurityCode"]'}
80
- SP_premiumuser_btnpay: {xpath_selector: './/*[@id="btnPay"]'}
81
- SP_premiumuser_resultpay: {xpath_selector: '//div[@id="page-payment-result-confirm"]//p[1]'}
82
- SP_disapproveuser: {xpath_selector: '//a[contains(text(),"Disapprove and show next member")]'}
83
- SP_signup_clickcopenhagen: {xpath_selector: '//*[@id="result-search-location"]/div/span[2]/span'}
84
- SP_signup_clickplacesport: {xpath_selector: '//*[@id="mb-signup-city"]'}
85
- SP_signup_chooseDKlanguage: {xpath_selector: '//a[contains(text(),"DK")]'}
86
- SP_searchuserinfrontend: {css_selector: '#txtName'}
87
- SP_searchuserfakeinput: {xpath_selector: '//input[@id="input-search-mobile"]'}
88
- SP_buttonsearchuserfakeinput: {xpath_selector: '//div[@id="mb-search-result-row"]/div[1]/span[1]'}
89
- SP_buttonsendmessage: {xpath_selector: '//button[@id="btn-start-chat"]'}
90
- SP_contentmessage: {xpath_selector: '//textarea[@id="message"]'}
91
- SP_totalunread: {xpath_selector: '//*[@id="total-unread"]'}
92
- SP_verify_messagesent: {xpath_selector: '//div[@class="message"]'}
93
- SP_sendrequestphoto: {xpath_selector: '//button[@class="btn-block btn outline-white-zero btn-request-photo"]//img'}
94
- SP_viewsenderequestphoto: {xpath_selector: '//span[@class="sport-icons mail-comming"]'}
95
- SP_verifysenderequestphoto: {xpath_selector: '//div[@class="inner-content"]'}
96
- SP_searchauserinfrontend: {xpath_selector: '//div[@class="search-panel search-control"]//input'}
97
- SP_sendmessagetouserbutton: {xpath_selector: '//button[@id="btnSubmitChat"]'}
98
- SP_clicktousertoverifysomething: {xpath_selector: '//span[@class="name receiver-name"]'}
99
- SP_Profile: {xpath_selector: '//a[@class="dropdown-item"][contains(text(),"Profil")]'}
100
- SP_registeruser_selectcontry: {ph_xpath_selector: '//*[@id="Country"]/option[.="<ph_value>"]'}
101
- SP_upgradedotpay_nooffer: {xpath_selector: '//div[4]//form[1]//button[1]'}
102
- SP_upgradedotpay_avataruser: {xpath_selector: '//a[@class="p-0 btn btn-menu"]'}
103
- SP_upgradedotpay_upgradebutton: {xpath_selector: '//a[@class="menu-upgrade-button btn deep-sky-blue go-to-package"]'}
104
- SP_upgradedotpay_yesoffer: {xpath_selector: '//div[@class="row"]//div[@class="row"]//button[@class="btn btn-round azure"]'}
105
- SP_upgradedotpay_selecmethod: {xpath_selector: '//div[@id="heading-dotpay"]//label[@class="payment-method-header collapsed"]'}
106
- SP_upgradedotpay_submitpaymentmethod: {xpath_selector: '//button[@id="btnPay-dotpay"]'}
107
- SP_upgradedotpay_firstname: {xpath_selector: '//input[@id="id_dp-firstname"]'}
108
- SP_upgradedotpay_surname: {xpath_selector: '//input[@id="id_dp-lastname"]'}
109
- SP_upgradedotpay_checkbox: {xpath_selector: '//input[@id="id_dp-marketing_agreement"]'}
110
- SP_upgradedotpay_pay: {xpath_selector: '//button[@id="payment-form-submit-dp"]'}
111
- SP_upgradedotpay_accept: {xpath_selector: '//input[@id="submit_success"]'}
112
- SP_upgradedotpay_cancel: {xpath_selector: '//input[@id="submit_error"]'}
113
- SP_upgradedotpay_paymentsuccess: {xpath_selector: '//p[@class="text-center m-0 font-size-40 text-color-white font-family-gilroy font-weight-bold"]'}
114
- SP_upgradesepa_selecmethod: {xpath_selector: '//div[@id="heading-sepadirectdebit"]//label[@class="payment-method-header collapsed"]'}
115
- SP_upgradesepa_ownername: {xpath_selector: '//input[@name="sepa.ownerName"]'}
116
- SP_upgradesepa_ibannumber: {xpath_selector: '//input[@name="sepa.ibanNumber"]'}
117
- SP_upgradesepa_submitpaymentmethod: {xpath_selector: '//button[@id="btnPay-sepadirectdebit"]'}
118
- SP_upgradepaypal_disar: {xpath_selector: '//span[@class="slider round"]'}
119
- SP_upgradepaypal_selectionmethod: {xpath_selector: '//div[@id="heading-paypal"]//label[@class="payment-method-header collapsed"]'}
120
- SP_upgradepaypal_submitpaymentmethod: {xpath_selector: '//button[@id="btnPay-paypal"]'}
121
- SP_upgradepaypal_email: {xpath_selector: '//input[@id="email"]'}
122
- SP_upgradepaypal_password: {xpath_selector: '//input[@id="password"]'}
123
- SP_upgradepaypal_login: {xpath_selector: '//button[@id="btnLogin"]'}
124
- #SP_upgradepaypal_continuepayment: {xpath_selector: '//input[@id='confirmButtonTop']'}
125
- SP_upgradepaypal_finishpayment: {xpath_selector: '//input[@id="confirmButtonTop"]'}
126
- SP_upgradepaypal_cancel: {xpath_selector: '//a[@id="cancelLink"]'}
127
- SP_upgradepayment_result: {xpath_selector: '//p[@class="text-center font-size-30 text-color-white font-family-gilroy font-weight-bold"]'}
128
- SP_downgrade_admin: {xpath_selector: '//button[@class="btn btn-lg btn-primary btn-block btn-signin"]'}
129
- SP_downgrade_email: {xpath_selector: '//input[@id="Email"]'}
130
- SP_downgrade_password: {xpath_selector: '//input[@id="Password"]'}
131
- SP_downgrade_submitlogin: {xpath_selector: '//button[@class="btn btn-block black-two"]'}
132
- SP_downgrade_useritem: {xpath_selector: '//a[contains(text(),"Users")]'}
133
- SP_downgrade_lookupuser: {xpath_selector: '//a[contains(text(),"Lookup Members")]'}
134
- SP_downgrade_searchbox: {xpath_selector: '//input[@class="k-textbox ng-pristine ng-valid ng-touched"]'}
135
- SP_downgrade_selectuser: {xpath_selector: '//a[contains(text(),"TestIFDSportPartner03")]'}
136
- SP_downgrade_edituserbutton: {xpath_selector: '//button[@class="btn btn-info"]'}
137
- SP_downgrade_membertype: {xpath_selector: '//tr[16]//td[2]//select[1]'}
138
- SP_downgrade_selecmembertype: {ph_xpath_selector: '//*[@id="page-wrapper"]//div[2]//tr[17]/td[2]//select/option[@value="<ph_value>"]'}
139
- SP_downgrade_save: {xpath_selector: '//button[@class="btn btn-warning"]'}
140
- SP_payment: {xpath_selector: '//body/div[@id="payment-method"]/div[@class="sport-payment-land"]/div[@class="choose-options-method payment-chooser-wrapper"]/div[@class="content"]/form/ul[@class="list-unstyled"]/li[1]/label[1]'}
141
- SP_submitpayment: {xpath_selector: '//button[@id="btnSubmitPayment"]'}
142
- SP_upgradetrustpay_method: {xpath_selector: '//div[@id="heading-trustpay"]//label[@class="payment-method-header collapsed"]'}
143
- SP_upgradetrustpay_submitmethod: {xpath_selector: '//button[@id="btnPay-trustpay"]'}
144
- SP_upgradetrustpay_selectbank: {ph_xpath_selector: '//select[@id="trustPayOnlineBankList"]/option[contains(text(),"<ph_value>")]'} #Komerční banka a.s.
145
- SP_upgradetrustpay_continuepayment: {xpath_selector: '//input[@id="mainSubmit"]'}
146
- SP_upgradetrustpay_previous: {xpath_selector: '//input[@id="mainBack"]'}
147
- SP_upgradeentercash_method: {xpath_selector: '//div[@id="heading-entercash"]//label[@class="payment-method-header collapsed"]'}
148
- SP_upgradeentercash_selectbanks: {xpath_selector: '//div[@id="collapse-entercash"]//select[@class="form-control input-field"]/option[@value="505"]'}
149
- SP_upgradeentercash_submitmethod: {xpath_selector: '//button[@id="btnPay-entercash"]'}
150
- SP_upgradeentercash_username: {xpath_selector: '//tr[1]//td[2]//input[1]'}
151
- SP_upgradeentercash_password: {xpath_selector: '//div[@id="login"]//tr[2]//td[2]//input[1]'}
152
- SP_upgradeentercash_login: {xpath_selector: '//input[@id="login_button"]'}
153
- SP_upgradeentercash_confirmpayment: {xpath_selector: '//input[@id="deposit_button"]'}
154
- SP_upgradeentercash_cancelpayment: {xpath_selector: '//input[@id="cancel_button"]'}
155
- SP_upgradeentercash_clickhere_sucessful: {xpath_selector: '//a[@id="back_to_merchant"]'}
@@ -1,27 +1,3 @@
1
- # $_CFWEB = Hash.new
2
- # $current_dir = File.expand_path(File.dirname(__FILE__))
3
- # $base_dir = File.expand_path(File.dirname(__FILE__) + '/../..')
4
- # $PARAMS = YAML.load_file("#{$test_data_dir}/globalData.yml")
5
-
6
- # CONFIG_NAME = ENV['CONFIG_NAME']
7
- # if %w(server local).include? ENV['CONFIG_NAME']
8
- # server_env = ENV['CONFIG_NAME']
9
- # else
10
- # puts "❌ Error: CONFIG_NAME should be: server || local"
11
- # exit(1)
12
- # end
13
- # begin
14
- # puts "checking Object Repository format..."
15
- # $OBJECT = YAML.load_file("#{$base_dir}/features/step_definitions/repositories/project_object.yml")
16
- # puts "✅"
17
- # puts "checking Automation Setting format..."
18
- # BROWSER_CONFIG = YAML.load_file("#{$base_dir}/config/#{CONFIG_NAME}_browser_config.yml")
19
- # puts "✅"
20
- # rescue Psych::SyntaxError => ex
21
- # puts "❌ SyntaxError #{ex.message[/: .+/]}"
22
- # exit(1)
23
- # end
24
-
25
1
  STDOUT.sync = true
26
2
  require 'rubygems'
27
3
  require 'capybara'
@@ -31,33 +7,4 @@ require 'yaml'
31
7
  require 'selenium-webdriver'
32
8
  require 'Ifd_Automation'
33
9
  require 'report_builder'
34
- # require "#{$current_dir}/itms_action.rb"
35
- # itms_action = ITMS.new
36
-
37
- # if ENV['EXECUTE']
38
- # if ENV['TESTSUITE'] && ENV['TESTCASE_REPORT_NAME']
39
- # @report_path = "Reports/#{ENV['TESTSUITE']}"
40
- # @testcase_report_name = ENV['TESTCASE_REPORT_NAME']
41
- # else
42
- # puts "❌ ERROR: Missing TESTSUITE || TESTCASE_REPORT_NAME"
43
- # exit(1)
44
- # end
45
- # end
46
- # $print_log = ENV["PRINT_LOG"] || false
47
- # $_CFWEB['Maximize Browser'] = ENV["MAXIMIZE_BROWSER"] || true
48
- # SELENIUM_SERVER_URL = ENV['SERVER_URL'] || BROWSER_CONFIG['server_url']
49
- # BROWSER_CAPS = BROWSER_CONFIG['browser_caps'][ENV['BROWSER']]
50
- # if CONFIG_NAME == "local"
51
- # itms_action.getServerStatus(SELENIUM_SERVER_URL)
52
- # end
53
-
54
- # Capybara.register_driver :selenium do |app|
55
- # Capybara::Selenium::Driver.new(app,
56
- # :browser => :remote,
57
- # :url => SELENIUM_SERVER_URL,
58
- # :desired_capabilities => BROWSER_CAPS.reduce { |acc, h| (acc || {}).merge h }
59
- # )
60
- # end
61
10
 
62
- # Capybara.default_driver = :selenium
63
- # Capybara.run_server = false
@@ -1,13 +1,19 @@
1
1
  Before do
2
+ $driver = getDriver
3
+ $wait_time = ENV["WAIT_TIME"] || 30
4
+ $print_log = ENV["PRINT_LOG"] || false
5
+ end
6
+
7
+ AfterConfiguration do
8
+ $OBJECT = loadYAMLfile("features/step_definitions/repositories/project_object.yml")
2
9
  if ENV['SERVER_URL'].nil?
3
10
  puts "❌ ERROR: Missing param SERVER_URL."
4
11
  exit(1)
5
12
  end
6
- $driver = getDriver
7
- getConfig
8
- $browser_data = page.driver.browser.capabilities
9
- $wait_time = ENV["WAIT_TIME"] || 30
10
- $print_log = ENV["PRINT_LOG"] || false
13
+ if ENV['BROWSER'].nil?
14
+ puts "❌ ERROR: Missing param BROWSER."
15
+ exit(1)
16
+ end
11
17
  if ENV['DELETE_COOKIE']
12
18
  browser = Capybara.current_session.driver.browser
13
19
  browser.manage.delete_all_cookies
@@ -17,74 +23,52 @@ end
17
23
  def getDriver
18
24
  case ENV['BROWSER']
19
25
  when "chrome"
26
+ @chrome_options = loadYAMLfile('config/chrome_options.yaml')
20
27
  Capybara.register_driver :selenium do |app|
21
- Capybara::Selenium::Driver.new(app, browser: :chrome,:url => ENV['SERVER_URL'])
28
+ Capybara::Selenium::Driver.new(app, :url => ENV['SERVER_URL'],:desired_capabilities => Selenium::WebDriver::Remote::Capabilities.chrome(chromeOptions: @chrome_options))
22
29
  end
23
30
  Capybara.current_driver = :selenium
24
31
  when "firefox"
32
+ @firefox_options = loadYAMLfile('config/firefox_options.yaml')
25
33
  Capybara.register_driver :selenium do |app|
26
- Capybara::Selenium::Driver.new(app, browser: :firefox,:url => ENV['SERVER_URL'])
34
+ Capybara::Selenium::Driver.new(app, :url => ENV['SERVER_URL'], :desired_capabilities => Selenium::WebDriver::Remote::Capabilities.firefox(firefoxOptions: @firefox_options))
27
35
  end
28
36
  Capybara.current_driver = :selenium
29
37
  when "safari"
38
+ @safari_options = loadYAMLfile('config/safari_options.yaml')
30
39
  Capybara.register_driver :selenium do |app|
31
- Capybara::Selenium::Driver.new(app, browser: :safari,:url => ENV['SERVER_URL'])
40
+ Capybara::Selenium::Driver.new(app, :url => ENV['SERVER_URL'], :desired_capabilities => Selenium::WebDriver::Remote::Capabilities.safari(safariOptions: @safari_options))
32
41
  end
33
42
  Capybara.current_driver = :selenium
34
43
  when "ie"
44
+ @ie_options = loadYAMLfile('config/ie_options.yaml')
35
45
  Capybara.register_driver :selenium do |app|
36
- Capybara::Selenium::Driver.new(app, browser: :ie,:url => ENV['SERVER_URL'])
37
- end
38
- Capybara.current_driver = :selenium
39
- when "opera"
40
- Capybara.register_driver :selenium do |app|
41
- Capybara::Selenium::Driver.new(app, browser: :opera,:url => ENV['SERVER_URL'])
46
+ Capybara::Selenium::Driver.new(app, :url => ENV['SERVER_URL'], :desired_capabilities => Selenium::WebDriver::Remote::Capabilities.internet_explorer(ieOptions: @ie_options))
42
47
  end
43
48
  Capybara.current_driver = :selenium
44
49
  when "chrome_headless"
50
+ @chrome_options = loadYAMLfile('config/chrome_options.yaml')
45
51
  Capybara.register_driver :selenium do |app|
46
- Capybara::Selenium::Driver.new(app, browser: :chrome, :desired_capabilities => $CAPS)
52
+ Capybara::Selenium::Driver.new(app, :desired_capabilities => Selenium::WebDriver::Remote::Capabilities.chrome(chromeOptions: @chrome_options))
47
53
  end
48
- Capybara.current_driver = :selenium_chrome_headless
54
+ Capybara.current_driver = :selenium_headless
49
55
  when "firefox_headless"
50
- Capybara.register_driver :headless_firefox do |app|
51
- Capybara::Selenium::Driver.new(app, browser: :firefox)
56
+ @firefox_options = loadYAMLfile('config/firefox_options.yaml')
57
+ Capybara.register_driver :selenium do |app|
58
+ Capybara::Selenium::Driver.new(app, :desired_capabilities => Selenium::WebDriver::Remote::Capabilities.firefox(firefoxOptions: @firefox_options))
52
59
  end
53
60
  Capybara.current_driver = :selenium_headless
54
- when "iphone_headless"
55
- Capybara.register_driver(:iphone_headless) do |app|
56
- user_agent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3'
57
- capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
58
- chromeOptions: { args: (%w[ headless disable-gpu hide-scrollbars ] << "--user-agent='#{user_agent}'") }
59
- )
60
- Capybara::Selenium::Driver.new(app,:url => ENV['SERVER_URL'], browser: :chrome, desired_capabilities: capabilities)
61
- end
62
- Capybara.default_driver = :iphone_headless
63
- when "nexus_headless"
64
- Capybara.register_driver(:nexus_headless) do |app|
65
- user_agent = "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19"
66
- capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
67
- chromeOptions: { args: (%w[ headless disable-gpu hide-scrollbars ] << "--user-agent='#{user_agent}'") }
68
- )
69
- # mobile_emulation = {
70
- # "deviceMetrics" => { "width" => 360, "height" => 640, "pixelRatio" => 3.0 },
71
- # "userAgent" => "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19"
72
- # }
73
-
74
- Capybara::Selenium::Driver.new(app,:url => ENV['SERVER_URL'], browser: :chrome, desired_capabilities: capabilities)
75
- end
76
- Capybara.default_driver = :nexus_headless
77
- else
78
- puts "❌ ERROR: Unsupported browser: #{ENV['BROWSER']}. Available: chrome || firefox || safari || ie || opera || chrome_headless || firefox_headless || iphone_headless || nexus_headless"
61
+ else
62
+ puts "❌ ERROR: Unsupported browser: #{ENV['BROWSER']}. Available: chrome || firefox || safari || ie || chrome_headless || firefox_headless"
79
63
  exit(1)
80
64
  end
81
65
  end
82
66
 
83
- def getConfig
67
+ def loadYAMLfile(filename)
84
68
  begin
85
- $OBJECT = YAML.load_file("features/step_definitions/repositories/project_object.yml")
69
+ return YAML.load_file(filename)
86
70
  rescue Psych::SyntaxError => ex
87
- puts "❌ Object Repository :: SyntaxError #{ex.message[/: .+/]}"
71
+ puts "❌ SyntaxError when reading file: #{ex}"
88
72
  exit(1)
89
73
  end
90
74
  end
@@ -94,24 +78,26 @@ def validateReport
94
78
  @report_path = "Reports/#{ENV['TESTSUITE']}"
95
79
  @testcase_report_name = ENV['TESTCASE_REPORT_NAME']
96
80
  else
97
- puts "❌ ERROR: Missing param TESTSUITE || TESTCASE_REPORT_NAME"
81
+ puts "❌ ERROR: Missing param TESTSUITE || TESTCASE_REPORT_NAME. Report could not be generated."
98
82
  exit(1)
99
83
  end
100
84
  end
101
85
 
102
86
  After do |scenario|
103
- # save_screenshot = ENV['SCREENSHOT'] || false
104
- # if save_screenshot == true
105
- # file_name = 'failed_%s.png' % rand(1000).to_s
106
- # page.save_screenshot($screenshot+file_name) if scenario.failed?
107
- # begin
108
- # Capybara.page.driver.quit
109
- # Capybara.send(:session_pool).delete_if { |key, value| key =~ /selenium/i }
110
- # rescue StandardError => myStandardError
111
- # puts "❌ Error: #{myStandardError}"
112
- # exit(1)
113
- # end
114
- # end
87
+ # save_screenshot = ENV['SCREENSHOT'] || false
88
+ # if save_screenshot == true
89
+ # file_name = 'failed_%s.png' % rand(1000).to_s
90
+ # page.save_screenshot($screenshot+file_name) if scenario.failed?
91
+ # begin
92
+ # Capybara.page.driver.quit
93
+ # Capybara.send(:session_pool).delete_if { |key, value| key =~ /selenium/i }
94
+ # rescue StandardError => myStandardError
95
+ # puts "❌ Error: #{myStandardError}"
96
+ # exit(1)
97
+ # end
98
+ # end
99
+ # $browser_data = page.driver.browser.capabilities
100
+ # p "$browser_data:#{$browser_data.inspect}"
115
101
  end
116
102
 
117
103
  at_exit do
@@ -129,14 +115,13 @@ at_exit do
129
115
  config.report_types = [:json, :html]
130
116
  config.color = 'blue'
131
117
  config.additional_info = {
132
- 'Browser' => browser_name || nil,
133
- 'Platform' => platform || nil,
134
- 'Browser Version' => browser_version || nil,
135
- 'Report Generated' => time
136
- }
118
+ 'Browser' => browser_name || nil,
119
+ 'Platform' => platform || nil,
120
+ 'Browser Version' => browser_version || nil,
121
+ 'Report Generated' => time
122
+ }
137
123
  end
138
124
  options = { report_title: "INFOdation Test Management System" }
139
125
  ReportBuilder.build_report options
140
126
  end
141
127
  end
142
-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Ifd_Automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anh Pham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-11 00:00:00.000000000 Z
11
+ date: 2019-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -236,9 +236,11 @@ files:
236
236
  - project/Gemfile.lock
237
237
  - project/README.md
238
238
  - project/Rakefile
239
- - project/config/options.config
239
+ - project/config/chrome_options.yaml
240
+ - project/config/firefox_options.yaml
241
+ - project/config/ie_options.yaml
242
+ - project/config/safari_options.yaml
240
243
  - project/cucumber.yml
241
- - project/features/TestData/globalData.yml
242
244
  - project/features/TestSuite/WebGUI.feature
243
245
  - project/features/step_definitions/lib_steps/steps_definition.rb
244
246
  - project/features/step_definitions/repositories/project_object.yml
@@ -1,5 +0,0 @@
1
- {
2
- :capabilities => "test"
3
- }
4
-
5
-
@@ -1,7 +0,0 @@
1
- login_page: http://10.5.1.200:6368/login
2
- login_user: user
3
- login_pass: 123456
4
- send_email_username:
5
- send_email_password:
6
- receive_email_username:
7
- receive_email_password: