browser_shooter 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -3
- data/examples/config4.yml +14 -7
- data/lib/browser_shooter/commander.rb +3 -1
- data/lib/browser_shooter/version.rb +1 -1
- metadata +14 -14
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Combined with Selenium RC this gem allows to program Selenium scripts combined w
|
|
12
12
|
2. Download the last version of [Selenium Server](http://seleniumhq.org/download/) (AKA Selenium Remote Control).
|
13
13
|
3. Go to the console and start the Selenium Server:
|
14
14
|
|
15
|
-
java -jar
|
15
|
+
java -jar <your selenium server file>.jar
|
16
16
|
|
17
17
|
|
18
18
|
#### Pluging for IE screenshots
|
@@ -33,6 +33,7 @@ Create a YAML file like this:
|
|
33
33
|
|
34
34
|
# myconfig.yml
|
35
35
|
output_path: "/tmp/shoots"
|
36
|
+
logs_format: "csv"
|
36
37
|
|
37
38
|
scripts:
|
38
39
|
google:
|
@@ -64,7 +65,7 @@ Create a YAML file like this:
|
|
64
65
|
port: 4444
|
65
66
|
browser: "*iexploreproxy"
|
66
67
|
|
67
|
-
Look in the
|
68
|
+
Look in the [examples folder](https://github.com/fguillen/BrowserShooter/tree/master/examples) for more complete examples.
|
68
69
|
|
69
70
|
|
70
71
|
#### Run the BrowserShooter script
|
@@ -73,8 +74,11 @@ Look in the `examples` folder for more complete examples.
|
|
73
74
|
|
74
75
|
The screenshots will be stored in:
|
75
76
|
|
76
|
-
/<output_path>/<time_stamp
|
77
|
+
/<output_path>/<time_stamp>/shots/<script_name>_<browser_name>[_<sufix>].png
|
77
78
|
|
79
|
+
The logs will be stored in:
|
80
|
+
|
81
|
+
/<output_path>/<time_stamp>/logs/<script_name>_<browser_name>[_<sufix>].png
|
78
82
|
## Status
|
79
83
|
|
80
84
|
Still in a _discovery_ state.. but is already **functional**.
|
data/examples/config4.yml
CHANGED
@@ -3,24 +3,31 @@ output_path: "~/browser_shooter"
|
|
3
3
|
scripts:
|
4
4
|
lightbox:
|
5
5
|
name: "lightbox"
|
6
|
-
url: "http://
|
6
|
+
url: "http://192.168.70.54:3000"
|
7
7
|
commands: |
|
8
8
|
open "/test/browser_shooter/lightbox_bareplayer.html"
|
9
9
|
window_maximize
|
10
|
-
shot_system
|
10
|
+
shot_system 01_first
|
11
11
|
pause 5
|
12
12
|
alert
|
13
13
|
click "link=Show video"
|
14
14
|
pause 5
|
15
|
-
shot_system
|
16
|
-
select_frame "
|
15
|
+
shot_system 02_video
|
16
|
+
select_frame "index=0"
|
17
17
|
run_script "$f().play()"
|
18
|
+
pause 3
|
19
|
+
shot_system 03_video_start
|
18
20
|
wait_for_element "css=span.enabled", :timeout_in_seconds => 15
|
19
|
-
shot_system
|
21
|
+
shot_system 04_green_button
|
20
22
|
click "css=span.enabled"
|
21
23
|
pause 8
|
22
|
-
shot_system
|
24
|
+
shot_system 05_spinner
|
23
25
|
alert
|
26
|
+
select_frame "relative=up"
|
27
|
+
click "id=sp_close_x"
|
28
|
+
alert
|
29
|
+
wait_for_condition "selenium.browserbot.getCurrentWindow().document.getElementById('sp_lightbox').style.display == 'none'", 10000
|
30
|
+
shot_system 06_hidden
|
24
31
|
|
25
32
|
browsers:
|
26
33
|
osx-firefox:
|
@@ -33,4 +40,4 @@ browsers:
|
|
33
40
|
name: "windows-explorer"
|
34
41
|
host: 10.211.55.4
|
35
42
|
port: 4444
|
36
|
-
browser: "*
|
43
|
+
browser: "*iehta"
|
@@ -50,6 +50,8 @@ class BrowserShooter
|
|
50
50
|
)
|
51
51
|
|
52
52
|
rescue Exception => e
|
53
|
+
BrowserShooter::Logger.log "ERROR: #{e.message}"
|
54
|
+
|
53
55
|
result.merge!(
|
54
56
|
:success => false,
|
55
57
|
:message => e.message
|
@@ -90,7 +92,7 @@ class BrowserShooter
|
|
90
92
|
BrowserShooter::Logger.log "pausing #{seconds} seconds"
|
91
93
|
Kernel.sleep seconds
|
92
94
|
|
93
|
-
return "#{seconds} later..."
|
95
|
+
return "#{seconds} seconds later..."
|
94
96
|
end
|
95
97
|
|
96
98
|
def self.timestamp
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: browser_shooter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-03 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
|
-
requirement: &
|
16
|
+
requirement: &70323866501000 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.0.0.rc.6
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70323866501000
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70323866500500 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - =
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.9.2.2
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70323866500500
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: mocha
|
38
|
-
requirement: &
|
38
|
+
requirement: &70323866500120 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70323866500120
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: selenium-webdriver
|
49
|
-
requirement: &
|
49
|
+
requirement: &70323866499660 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70323866499660
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: selenium
|
60
|
-
requirement: &
|
60
|
+
requirement: &70323866499240 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70323866499240
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: selenium-client
|
71
|
-
requirement: &
|
71
|
+
requirement: &70323866498820 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70323866498820
|
80
80
|
description: Selenium RC wraper to create browser screenshots
|
81
81
|
email:
|
82
82
|
- fguillen.mail@gmail.com
|