webdrone 1.3.6 → 1.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 266a14a56d02429bbdb62ade05574c5ac0709024
4
- data.tar.gz: cd299b9d26ddd5722c2addf9d5a769e96c374398
3
+ metadata.gz: c5c61b1635bc5e09cb2f316f3fdad25b92022e2d
4
+ data.tar.gz: af1e8cd59a1fd3e7f5573af9571a8c936311e976
5
5
  SHA512:
6
- metadata.gz: 5b5e1aacdbc162fd145116beb6c936901144109f98aaa3050bac83458c74103fda1cfc81a61f9acc752189729c3320c19566bdd979a7bd89bce7e6ead224ed9a
7
- data.tar.gz: d763fb7e80e9c2f29c9e962dc12ce8fc735c7686c740a790d01609f9d80018f30e7b974a15b4cd088ee91e5f3d62c30f559bf105beda077e2c71f9e0dade2761
6
+ metadata.gz: 4277e8513f07a2e902223a2c4577b38d9b0f1ae60698b04ae10784c349aeed37bd3d6f01c3bf9ffefe7dfe792c98ee22b2a5328a2435c2538996f894dfac99ee
7
+ data.tar.gz: b49f59afa48a8d9ea3816beffa540e86f4dbc4506113a2a529ca4c18af1cbc6f2efd676ea599ab652f4ea5499c1217cca67bb06d72ccd91e07f56c7666ea30e3
data/CHANGELOG.md ADDED
@@ -0,0 +1,166 @@
1
+ # Changelog
2
+
3
+ New features are summarized here.
4
+
5
+
6
+ ## v1.4.0 - 2016-06-27
7
+ ### Added
8
+ - This changelog.
9
+ - New option `Webdrone.create` `remote\_selenium:` for remote selenium servers. Start a server with `java -jar selenium-server.jar`, grab the URL (something like `http://192.168.0.1:4444/wd/hub`), then in your script you can use:
10
+ ```ruby
11
+ a0 = Webdrone.create timeout: 10, browser: :ie, remote_selenium: 'http://192.168.0.1:4444/wd/hub'
12
+ ```
13
+
14
+ You can override this option by using the environment WEBDRONE\_REMOTE\_SELENIUM, as usual.
15
+
16
+
17
+ ## v1.3.6 - 2016-06-22
18
+ ### Fixed
19
+ - Bug `ArgumentError: comparison of Array with Array failed` when updating empty data using `a0.form.save`.
20
+
21
+
22
+
23
+ ## v1.3.4 - 2016-06-22
24
+ ### Fixed
25
+ - Bug in `a0.logg` on Windows, when redirecting output to a file.
26
+
27
+
28
+
29
+ ## v1.3.2 - 2016-06-22
30
+ ### Changed
31
+ - `a0.console` is now disabled if developer mode is turned off (`developer: false` option).
32
+ - Ensure a minimum size for `a0.logg`.
33
+
34
+
35
+
36
+ ## v1.3.0 - 2016-06-17
37
+ ### Added
38
+ - New logger `a0.logg` will automatically log every Webdrone command to stdout AND in trace file `a0_webdrone_trace.csv`.
39
+ - New option `Webdrone.create` `logger:` to disable the logger (by default is `true`).
40
+ ### Changed
41
+ - More realible detection of source code when reporting exceptions.
42
+
43
+
44
+
45
+ ## v1.2.2 - 2016-06-16
46
+ ### Fixed
47
+ - Bug when saving an empty excel in `a0.form.save`.
48
+ - Ensure `a0.form.save` updates the excel even if an error occurs.
49
+
50
+
51
+
52
+ ## v1.2.0 - 2016-06-15
53
+ ### Added
54
+ - New command `a0.form.save`, it keeps an excel file with all data updated when using `a0.form.set` in the given block of code. For example, if you have the following excel and the following code:
55
+
56
+ |User|wants_email?|
57
+ |----|------------|
58
+ |fry | |
59
+
60
+
61
+ ```ruby
62
+ a0.form.save filename: 'data.xlsx', sheet: 'name or index', item: 'john', name: 'User' do
63
+ a0.form.set 'wants_email?', 'YES'
64
+ a0.form.set 'alternative_email', 'john@example.com'
65
+ end
66
+ ```
67
+
68
+ The excel will contain the following updated data:
69
+ |User|alternative_email|wants_email?|
70
+ |----|-----------------|------------|
71
+ |fry | | |
72
+ |john|john@example.com |YES |
73
+
74
+
75
+
76
+ ## v1.1.4 - 2016-06-10
77
+ ### Added
78
+ - `a0.mark` now can take screenshots. So, instead of this code:
79
+ ```ruby
80
+ a0.mark.on 'something'
81
+ a0.shot.screen 'something' # => screenshot-XXX-something.png
82
+ ```
83
+
84
+ You can do the same in one line:
85
+ ```ruby
86
+ a0.mark.on 'something', shot: true # => screenshot-XXX-something.png
87
+ ```
88
+
89
+ You can set the name of the screenshot:
90
+ ```ruby
91
+ a0.mark.on 'something', shot: 'valid' # => screenshot-XXX-valid.png
92
+ ```
93
+
94
+
95
+
96
+ ## v1.1.2 - 2016-06-10
97
+ ### Fixed
98
+ - Bug on empty cells when saving an excel in `a0.xlsx.save`.
99
+
100
+
101
+
102
+ ## v1.1.0 - 2016-06-07
103
+ ### Changed
104
+ - `a0.vrfy` was not reporting on errors, like the rest of Webdrone.
105
+ - The following environment variables are translated from String to boolean:
106
+ - WEBDRONE\_CREATE\_OUTDIR
107
+ - WEBDRONE\_DEVELOPER
108
+ - WEBDRONE\_QUIT\_AT\_EXIT
109
+ - WEBDRONE\_MAXIMIZE
110
+
111
+ So setting something like `export WEBDRONE_DEVELOPER=false` will work as expected.
112
+
113
+ ### Fixed
114
+ - Bugs in `a0.console` when entering developer console on error.
115
+
116
+
117
+
118
+ ## v.1.0.8 - 2016-06-06
119
+ ### Changed
120
+ - Deprecating `Webdrone.irb_console` and `Webdrone.pry_console`, both replaced with `a0.console` which is based on Pry.
121
+
122
+
123
+
124
+ ## v1.0.6 - 2016-06-05
125
+ ### Added
126
+ - When using developer mode (`Webdrone.create` `developer: true`), the browser will be placed in the half left portion of your screen, so you can write/debug your scripts on the right ;-)
127
+ - A Pry console is available using `Webdrone.pry_console` in addition to `Webdrone.irb_console`.
128
+ - You can override any option passed to `Webdrone.create` by using special environment variables. For example, if your scripts runs firefox with a timeout of 10 seconds:
129
+ ```ruby
130
+ # test-script-01.rb
131
+ a0 = Webdrone.create timeout: 10, browser: :firefox
132
+ ```
133
+
134
+ You can run the same script with a timeout of 20 seconds and using Internet Explorer *WITHOUT ANY CHANGES TO THE SCRIPT*.
135
+
136
+ ```bash
137
+ export WEBDRONE_BROWSER=ie
138
+ export WEBDRONE_TIMEOUT=20
139
+ ruby test-script-01.rb
140
+ ````
141
+ - New option `Webdrone.create` `use_env:` to enable/disable the override described above (by default the option is `true`).
142
+
143
+ ### Changed
144
+ - A Pry console instead of IRB is launched when an error ocurrs in developer mode.
145
+
146
+
147
+
148
+ ## v1.0.4 - 2016-06-01
149
+ ### Fixed
150
+ - Bug in developer mode, sometimes the console did not worked as expected.
151
+
152
+
153
+
154
+ ## v1.0.2 - 2016-05-04
155
+ ### Fixed
156
+ - Make sure to restore old xpath when using `a0.form.with_xpath`.
157
+
158
+
159
+
160
+ ## v1.0.0 - 2016-05-04
161
+ ### Added
162
+ - Developer mode: a console appears when an error occurs. The console has the context of your script, so you can debug them easily.
163
+ - New option `Webdrone.create` `developer: true` to enable developer mode described above (by default is `false`).
164
+ - Added optional parameters `n:`, `visible:` to all commands in `a0.form`: `set`, `get`, `clic`, `mark` and `submit`.
165
+
166
+
@@ -50,14 +50,16 @@ module Webdrone
50
50
  end
51
51
  end
52
52
 
53
- def initialize(browser: 'firefox', create_outdir: true, outdir: nil, timeout:, developer: false, logger: true, quit_at_exit: false, maximize: true, error: :raise_report, win_x: nil, win_y: nil, win_w: nil, win_h: nil, use_env: true, chrome_prefs: nil, firefox_profile: nil)
53
+ def initialize(browser: 'firefox', create_outdir: true, outdir: nil, timeout:, developer: false, logger: true, quit_at_exit: false, maximize: true, error: :raise_report, win_x: nil, win_y: nil, win_w: nil, win_h: nil, use_env: true, chrome_prefs: nil, firefox_profile: nil, remote_selenium: nil)
54
54
  env_update(Kernel.binding) if use_env
55
55
  if create_outdir or outdir
56
56
  outdir ||= File.join("webdrone_output", Time.new.strftime('%Y%m%d_%H%M%S'))
57
57
  self.conf.outdir = outdir
58
58
  end
59
59
  outdir = File.join(Dir.pwd, outdir) if outdir != nil and not Pathname.new(outdir).absolute?
60
- if outdir != nil and browser.to_sym == :chrome
60
+ if remote_selenium
61
+ @driver = Selenium::WebDriver.for :remote, url: remote, desired_capabilities: browser.to_sym
62
+ elsif outdir != nil and browser.to_sym == :chrome
61
63
  chrome_prefs = Browser.chrome_prefs if chrome_prefs == nil
62
64
  chrome_prefs[:download][:default_directory] = outdir
63
65
  @driver = Selenium::WebDriver.for browser.to_sym, prefs: chrome_prefs, args: ['--disable-popup-blocking']
@@ -1,3 +1,3 @@
1
1
  module Webdrone
2
- VERSION = "1.3.6"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webdrone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aldrin Martoq
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-23 00:00:00.000000000 Z
11
+ date: 2016-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -190,6 +190,7 @@ files:
190
190
  - ".ruby-gemset"
191
191
  - ".ruby-version"
192
192
  - ".travis.yml"
193
+ - CHANGELOG.md
193
194
  - Gemfile
194
195
  - LICENSE.txt
195
196
  - README.md