actir 1.2.5 → 1.2.6

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
  SHA1:
3
- metadata.gz: 877c1e9f4bc3c641ba3df661bb2f70d91db4772d
4
- data.tar.gz: c2152aeeeb62d7e02eceba0ddb4c4fab024cf856
3
+ metadata.gz: 1723a71eb94987540f41f70bac00e57bc43d124c
4
+ data.tar.gz: 489b1fc573bb4a9c560fe839a8674463e095f7a1
5
5
  SHA512:
6
- metadata.gz: a2b674a34b7ca38185a993d443ef9d19e6d34a3e40a441084a69bd7d41bd88d745c6017e39bb49ec29926705ca6bfae5d20bdfb88ba4338b5825739517713c45
7
- data.tar.gz: aaf2be98321f305cd2d943a10bc29e940c378c41d9baa2826055e6108ded25df38be7deb3130b7d9ec84e9e67a31dd35004e4dac680c3163ab7a3955cb046b2b
6
+ metadata.gz: 043b2bc453715a30d53a1c4556a0636cdd6d071e79c2d76e28974ef5e38e17bef5a19409a75031cb942f7ea4a284a20c899a90f339ff84b7fba57b79c7e5608f
7
+ data.tar.gz: e6390f4ac8aad1cec5148dba2a28d7996f6a4d45f61f542aee31622bb46a80695db15be9671970308580fe3127b1b486ca4c1a2d53b6d83094315a3d0296c4b2
@@ -63,7 +63,8 @@ module Actir
63
63
  begin
64
64
  Actir::CookiesBaidu.update_all
65
65
  rescue Exception => e
66
- #若更新baidu_cookies失败,则打印错误信息,并中断测试执行
66
+ #若更新baidu_cookies失败,则关闭浏览器,打印错误信息,并中断测试执行
67
+ # Actir::CookiesBaidu.clear_after_failure
67
68
  puts "Exception: #{e.message} in"
68
69
  puts e.backtrace
69
70
  abort "update baidu cookies failed!!!"
@@ -59,6 +59,11 @@ module Actir
59
59
  Actir::Config.set("cookies.baidu." + card + "." + "available", "false")
60
60
  end
61
61
 
62
+ # 更新baidu_cookies失败后的清理操作。目前需要手动调用,后续优化
63
+ def clear_after_failure
64
+ @browser.close
65
+ end
66
+
62
67
  private
63
68
 
64
69
  # 更新配置文件中的baidu_cookies
@@ -90,6 +95,11 @@ module Actir
90
95
 
91
96
  # 登录百付宝主页
92
97
  def login_baifubao(username, password)
98
+ # 选择账号登陆(默认是短信快捷登录,所以需要点击切换一下)
99
+ link_baifubao_login_back.wait_until_present
100
+ link_baifubao_login_back.click
101
+ # 输入账号密码
102
+ text_baifubao_username.wait_until_present
93
103
  text_baifubao_username.set username
94
104
  text_baifubao_password.set password
95
105
  button_baifubao_login.click
@@ -131,10 +141,14 @@ module Actir
131
141
  end
132
142
 
133
143
  def button_baifubao_login
134
- #@browser.input(:xpath, "//input[@id='TANGRAM__PSP_4__submit']")
135
144
  @browser.input(:id => 'TANGRAM__PSP_4__submit')
136
145
  end
137
146
 
147
+ # 返回账号登陆的按钮
148
+ def link_baifubao_login_back
149
+ @browser.link(:id => 'TANGRAM__PSP_4__sms_btn_back')
150
+ end
151
+
138
152
  end
139
153
  end
140
154
 
@@ -1,3 +1,3 @@
1
1
  module Actir
2
- VERSION = "1.2.5"
2
+ VERSION = "1.2.6"
3
3
  end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actir
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - hub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-24 00:00:00.000000000 Z
11
+ date: 2016-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: watir-webdriver
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.6.11
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.6.11
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: selenium-webdriver
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.45'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.45'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: parallel
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.4'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.4'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: facets
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '2.9'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.9'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.7'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.7'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: '10.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '10.0'
111
111
  description: Distribut automated testing framework for Web or App.
@@ -117,8 +117,8 @@ executables:
117
117
  extensions: []
118
118
  extra_rdoc_files: []
119
119
  files:
120
- - ".gitignore"
121
- - ".travis.yml"
120
+ - .gitignore
121
+ - .travis.yml
122
122
  - CODE_OF_CONDUCT.md
123
123
  - Gemfile
124
124
  - README.md
@@ -160,17 +160,17 @@ require_paths:
160
160
  - lib
161
161
  required_ruby_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - ">="
163
+ - - '>='
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  requirements:
168
- - - ">="
168
+ - - '>='
169
169
  - !ruby/object:Gem::Version
170
170
  version: '0'
171
171
  requirements: []
172
172
  rubyforge_project:
173
- rubygems_version: 2.4.3
173
+ rubygems_version: 2.4.7
174
174
  signing_key:
175
175
  specification_version: 4
176
176
  summary: Application Concurrence Test in Ruby.