browser_shooter 0.1.3 → 0.2.3

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.
data/.gitignore CHANGED
@@ -6,3 +6,4 @@ tmp
6
6
  .rvmrc
7
7
  shoots/
8
8
  etc
9
+ chromedriver.log
data/README.md CHANGED
@@ -19,13 +19,18 @@ Combined with Selenium RC this gem allows to program Selenium scripts combined w
19
19
 
20
20
  [Spnapsie](http://snapsie.sourceforge.net/)
21
21
 
22
- Repeat this steps in every VM.
22
+
23
+ #### Chrome WebDriver
24
+
25
+ In the servers that are gonna execute Chrome you have to install the [ChromeDriver](http://code.google.com/p/selenium/wiki/ChromeDriver).
26
+
27
+ Repeat these steps in every VM.
23
28
 
24
29
  ### Setup the client
25
30
 
26
31
  #### Install the gem
27
32
 
28
- gem install "browsers_shooter"
33
+ gem install "browser_shooter"
29
34
 
30
35
  #### Config your BrowserShooter script
31
36
 
@@ -38,31 +43,31 @@ Create a YAML file like this:
38
43
  scripts:
39
44
  google:
40
45
  name: "google"
41
- url: "http://www.google.de"
42
- # commands are Selenium commands
46
+ # commands are WebDriver commands
43
47
  # except 'shot' command which receive an optional param with the 'sufix' of the page screenshot png
44
- # except 'shot_system' command which receive an optional param with the 'sufix' of the system screenshot png
45
48
  # except 'pause' command which use a Ruby 'sleep' command to pause
49
+ # except 'click' command whith receive a 'css_selector' as a param, find the element and click on it
50
+ # except 'type' command whith receive two params: 'css_selector' ana a 'message', find the element and type the message on it
51
+ # except 'wait_for_element' command whith receive two params: 'css_selector', and a 'timeout' in seconds
46
52
  commands: |
47
- open "/"
48
- window_maximize
53
+ navigate.to "http://www.google.de"
49
54
  shot before
50
- type "id=lst-ib", "fernando guillen"
51
- click "name=btnG", wait_for :page
55
+ type "input[name='q']", "beautiful houses"
56
+ click "input[name='btnG']"
57
+ pause 3
58
+ click "a.kls"
52
59
  pause 3
53
60
  shot after
54
61
 
55
62
  browsers:
56
63
  windows-firefox:
57
64
  name: "windows-firefox"
58
- host: 10.211.55.4
59
- port: 4444
60
- browser: "*firefox"
65
+ url: "http://127.0.0.1:4444/wd/hub"
66
+ browser: "firefox"
61
67
 
62
68
  windows-iexplore:
63
69
  name: "windows-iexploreproxy"
64
- host: 10.211.55.4
65
- port: 4444
70
+ url: "http://127.0.0.1:4444/wd/hub"
66
71
  browser: "*iexploreproxy"
67
72
 
68
73
  Look in the [examples folder](https://github.com/fguillen/BrowserShooter/tree/master/examples) for more complete examples.
@@ -74,11 +79,12 @@ Look in the [examples folder](https://github.com/fguillen/BrowserShooter/tree/ma
74
79
 
75
80
  The screenshots will be stored in:
76
81
 
77
- /<output_path>/<time_stamp>/shots/<script_name>_<browser_name>[_<sufix>].png
82
+ /<output_path>/<time_stamp>/shots
78
83
 
79
84
  The logs will be stored in:
80
85
 
81
- /<output_path>/<time_stamp>/logs/<script_name>_<browser_name>[_<sufix>].png
86
+ /<output_path>/<time_stamp>/logs
87
+
82
88
  ## Status
83
89
 
84
90
  Still in a _discovery_ state.. but is already **functional**.
data/examples/config1.yml CHANGED
@@ -3,34 +3,29 @@ output_path: "~/browser_shoots"
3
3
  scripts:
4
4
  google:
5
5
  name: "google"
6
- url: "http://www.google.de"
7
6
  commands: |
8
- open "/"
9
- window_maximize
7
+ navigate.to "http://www.google.de"
10
8
  shot before
11
- type "id=lst-ib", "fernando guillen"
12
- click "name=btnG"
9
+ type "input[name='q']", "beautiful houses"
10
+ click "input[name='btnG']"
11
+ pause 3
12
+ click "a.kls"
13
13
  pause 3
14
14
  shot after
15
15
 
16
-
17
16
  miniclip:
18
17
  name: "miniclip"
19
- url: "http://www.miniclip.com/games/de/"
20
18
  commands: |
21
- open "/"
22
- window_maximize
19
+ navigate.to "http://www.miniclip.com/games/de/"
23
20
  shot
24
21
 
25
22
  browsers:
26
- windows-firefox:
27
- name: "windows-firefox"
28
- host: 10.211.55.4
29
- port: 4444
30
- browser: "*firefox"
23
+ ios-firefox:
24
+ name: "ios-firefox"
25
+ url: "http://127.0.0.1:4444/wd/hub"
26
+ browser: "firefox"
31
27
 
32
- windows-iexplore:
33
- name: "windows-iexploreproxy"
34
- host: 10.211.55.4
35
- port: 4444
36
- browser: "*iexploreproxy"
28
+ ios-chrome:
29
+ name: "ios-chrome"
30
+ url: "http://127.0.0.1:4444/wd/hub"
31
+ browser: "chrome"
data/examples/config2.yml CHANGED
@@ -1,28 +1,34 @@
1
- output_path: "~/browser_shoots"
1
+ output_path: "~/browser_shooter"
2
2
 
3
3
  scripts:
4
- brandengage:
5
- name: "brandengage"
6
- url: "http://staging.iframe.sponsorpay.com"
4
+ lightbox:
5
+ name: "lightbox"
7
6
  commands: |
8
- open "/test/brandengage.html"
9
- window_maximize
10
- click "link=be_1372_dedicated"
7
+ navigate.to "http://192.168.70.76:3000/test/browser_shooter/lightbox_bareplayer.html"
8
+ shot 01_first
11
9
  pause 5
12
- get_alert
13
- click "link=sp.showVideo();"
10
+ switch_to.alert.accept
11
+ click "a"
14
12
  pause 5
15
- shot
13
+ shot 02_video
14
+ switch_to.frame "_sp_wiframe"
15
+ execute_script "$f().play()"
16
+ pause 3
17
+ shot 03_video_start
18
+ wait_for_element "span.enabled", 40
19
+ shot 04_green_button
20
+ click "span.enabled"
21
+ pause 8
22
+ switch_to.alert.accept
23
+ shot 05_spinner
24
+ switch_to.default_content
25
+ click "#sp_close_x"
26
+ switch_to.alert.accept
27
+ pause 4
28
+ shot 06_hidden
16
29
 
17
30
  browsers:
18
- windows-firefox:
19
- name: "windows-firefox"
20
- host: 10.211.55.4
21
- port: 4444
22
- browser: "*firefox"
23
-
24
- windows-iexplore:
25
- name: "windows-iexploreproxy"
26
- host: 10.211.55.4
27
- port: 4444
28
- browser: "*iexploreproxy"
31
+ osx-chrome:
32
+ name: "osx-chrome"
33
+ url: "http://127.0.0.1:4444/wd/hub"
34
+ browser: "chrome"
@@ -24,6 +24,31 @@ class BrowserShooter
24
24
  elsif( command.split[0].strip == "pause" )
25
25
  BrowserShooter::Commander.pause( command.split[1].strip.to_i )
26
26
 
27
+ elsif( command.split[0].strip == "wait_for_element" )
28
+ params = command.match /wait_for_element "(.*)"\s?,\s?(\d*)/
29
+
30
+ BrowserShooter::Commander.wait_for_element(
31
+ client,
32
+ params[1],
33
+ params[2].to_i
34
+ )
35
+
36
+ elsif( command.split[0].strip == "type" )
37
+ params = command.match /type "(.*)"\s?,\s?"(.*)"/
38
+
39
+ BrowserShooter::Commander.type(
40
+ client,
41
+ params[1],
42
+ params[2]
43
+ )
44
+
45
+ elsif( command.split[0].strip == "click" )
46
+ params = command.match /click "(.*)"/
47
+ BrowserShooter::Commander.click(
48
+ client,
49
+ params[1]
50
+ )
51
+
27
52
  else
28
53
  eval "client.#{command}"
29
54
 
@@ -67,25 +92,39 @@ class BrowserShooter
67
92
  path = "#{path}_#{sufix}.png"
68
93
 
69
94
  BrowserShooter::Logger.log "shooting in '#{path}'"
70
-
71
- File.open( path, "wb" ) do |f|
72
- f.write( Base64.decode64( client.capture_entire_page_screenshot_to_string( "" ) ) )
73
- end
95
+ client.save_screenshot path
74
96
 
75
97
  return path
76
98
  end
77
99
 
78
- def self.shot_system( client, path, sufix = timestamp )
79
- sufix = timestamp unless sufix
80
- path = "#{path}_#{sufix}.system.png"
100
+ # FIXME: Not supported in WebDriver
101
+ # def self.shot_system( client, path, sufix = timestamp )
102
+ # sufix = timestamp unless sufix
103
+ # path = "#{path}_#{sufix}.system.png"
104
+
105
+ # BrowserShooter::Logger.log "shooting system in '#{path}'"
106
+
107
+ # File.open( path, "wb" ) do |f|
108
+ # f.write( Base64.decode64( client.capture_screenshot_to_string ) )
109
+ # end
81
110
 
82
- BrowserShooter::Logger.log "shooting system in '#{path}'"
111
+ # return path
112
+ # end
83
113
 
84
- File.open( path, "wb" ) do |f|
85
- f.write( Base64.decode64( client.capture_screenshot_to_string ) )
114
+ def self.wait_for_element( client, css_selector, timeout )
115
+ wait = Selenium::WebDriver::Wait.new( :timeout => timeout )
116
+
117
+ wait.until do
118
+ client.find_element( "css", css_selector )
86
119
  end
120
+ end
87
121
 
88
- return path
122
+ def self.click( client, css_selector )
123
+ client.find_element( "css", css_selector ).click
124
+ end
125
+
126
+ def self.type( client, css_selector, text )
127
+ client.find_element( "css", css_selector ).send_keys( text )
89
128
  end
90
129
 
91
130
  def self.pause( seconds )
@@ -4,19 +4,15 @@ class BrowserShooter
4
4
  client = nil
5
5
 
6
6
  begin
7
- BrowserShooter::Logger.log "Runing script '#{script["name"]}' with url '#{script["url"]}' in browser '#{browser["name"]}'"
7
+ BrowserShooter::Logger.log "Runing script '#{script["name"]}' in browser '#{browser["name"]}'"
8
8
 
9
9
  client =
10
- Selenium::Client::Driver.new(
11
- :host => browser["host"],
12
- :port => browser["port"],
13
- :browser => browser["browser"],
14
- :url => script["url"],
15
- :timeout_in_seconds => 40
10
+ Selenium::WebDriver.for(
11
+ :remote,
12
+ :url => browser["url"],
13
+ :desired_capabilities => browser["browser"].to_sym
16
14
  )
17
15
 
18
- client.start_new_browser_session
19
-
20
16
  logs =
21
17
  script["commands"].lines.map do |command|
22
18
  BrowserShooter::Commander.wrapper_execute(
@@ -29,7 +25,7 @@ class BrowserShooter
29
25
  logs
30
26
 
31
27
  ensure
32
- client.close_current_browser_session if client
28
+ client.quit if client
33
29
 
34
30
  end
35
31
  end
@@ -1,3 +1,3 @@
1
1
  class BrowserShooter
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -21,22 +21,34 @@ class CommanderTest < Test::Unit::TestCase
21
21
  BrowserShooter::Commander.execute( "shot_system", "client", "shoot-path" )
22
22
  end
23
23
 
24
- def test_execute_when_shot_pause
24
+ def test_execute_when_pause
25
25
  BrowserShooter::Commander.expects( :pause ).with( 10 )
26
26
  BrowserShooter::Commander.execute( "pause 10", "client", "shoot-path" )
27
27
  end
28
28
 
29
+ def test_execute_when_wait_for_element
30
+ BrowserShooter::Commander.expects( :wait_for_element ).with( "client", "css_selector", 10 )
31
+ BrowserShooter::Commander.execute( "wait_for_element \"css_selector\", 10", "client", nil )
32
+ end
33
+
34
+ def test_execute_when_click
35
+ BrowserShooter::Commander.expects( :click ).with( "client", "css_selector" )
36
+ BrowserShooter::Commander.execute( "click \"css_selector\"", "client", nil )
37
+ end
38
+
39
+ def test_execute_when_type
40
+ BrowserShooter::Commander.expects( :type ).with( "client", "css_selector", "message a b" )
41
+ BrowserShooter::Commander.execute( "type \"css_selector\", \"message a b\"", "client", nil )
42
+ end
43
+
29
44
  def test_shot_with_sufix
30
45
  in_tmpdir do |tmpdir|
31
- client = stub( :capture_entire_page_screenshot_to_string => read_fixture( "screenshot.base64" ) )
46
+ client = mock()
32
47
  path = "#{tmpdir}/myfile"
33
48
 
34
- BrowserShooter::Commander.shot( client, path, "sufix" )
49
+ client.expects( :save_screenshot ).with( "#{path}_sufix.png" )
35
50
 
36
- assert_equal(
37
- Digest::MD5.hexdigest( Base64.decode64( read_fixture( "screenshot.base64" ) ) ),
38
- Digest::MD5.hexdigest( File.read( "#{path}_sufix.png" ) )
39
- )
51
+ BrowserShooter::Commander.shot( client, path, "sufix" )
40
52
  end
41
53
  end
42
54
 
@@ -44,46 +56,75 @@ class CommanderTest < Test::Unit::TestCase
44
56
  BrowserShooter::Commander.stubs( :timestamp ).returns( "timestamp" )
45
57
 
46
58
  in_tmpdir do |tmpdir|
47
- client = stub( :capture_entire_page_screenshot_to_string => read_fixture( "screenshot.base64" ) )
59
+ client = mock()
48
60
  path = "#{tmpdir}/myfile"
49
61
 
50
- BrowserShooter::Commander.shot( client, path, nil )
62
+ client.expects( :save_screenshot ).with( "#{path}_timestamp.png" )
51
63
 
52
- assert_equal(
53
- Digest::MD5.hexdigest( Base64.decode64( read_fixture( "screenshot.base64" ) ) ),
54
- Digest::MD5.hexdigest( File.read( "#{path}_timestamp.png" ) )
55
- )
64
+ BrowserShooter::Commander.shot( client, path, nil )
56
65
  end
57
66
  end
58
67
 
59
- def test_shot_system_with_sufix
60
- in_tmpdir do |tmpdir|
61
- client = stub( :capture_screenshot_to_string => read_fixture( "screenshot.base64" ) )
62
- path = "#{tmpdir}/myfile"
68
+ # FIXME: shot_system not supported in WebDriver
69
+ # def test_shot_system_with_sufix
70
+ # in_tmpdir do |tmpdir|
71
+ # client = stub( :capture_screenshot_to_string => read_fixture( "screenshot.base64" ) )
72
+ # path = "#{tmpdir}/myfile"
63
73
 
64
- BrowserShooter::Commander.shot_system( client, path, "sufix" )
74
+ # BrowserShooter::Commander.shot_system( client, path, "sufix" )
65
75
 
66
- assert_equal(
67
- Digest::MD5.hexdigest( Base64.decode64( read_fixture( "screenshot.base64" ) ) ),
68
- Digest::MD5.hexdigest( File.read( "#{path}_sufix.system.png" ) )
69
- )
70
- end
76
+ # assert_equal(
77
+ # Digest::MD5.hexdigest( Base64.decode64( read_fixture( "screenshot.base64" ) ) ),
78
+ # Digest::MD5.hexdigest( File.read( "#{path}_sufix.system.png" ) )
79
+ # )
80
+ # end
81
+ # end
82
+
83
+ # def test_shot_system_without_sufix
84
+ # BrowserShooter::Commander.stubs( :timestamp ).returns( "timestamp" )
85
+
86
+ # in_tmpdir do |tmpdir|
87
+ # client = stub( :capture_screenshot_to_string => read_fixture( "screenshot.base64" ) )
88
+ # path = "#{tmpdir}/myfile"
89
+
90
+ # BrowserShooter::Commander.shot_system( client, path, nil )
91
+
92
+ # assert_equal(
93
+ # Digest::MD5.hexdigest( Base64.decode64( read_fixture( "screenshot.base64" ) ) ),
94
+ # Digest::MD5.hexdigest( File.read( "#{path}_timestamp.system.png" ) )
95
+ # )
96
+ # end
97
+ # end
98
+
99
+ def test_wait_for_element
100
+ wait = mock()
101
+ client = mock()
102
+
103
+ Selenium::WebDriver::Wait.expects( :new ).with( :timeout => 10 ).returns( wait )
104
+ wait.expects( :until ).yields
105
+ client.expects( :find_element ).with( "css", "css_selector" )
106
+
107
+ BrowserShooter::Commander.wait_for_element( client, "css_selector", 10 )
71
108
  end
72
109
 
73
- def test_shot_system_without_sufix
74
- BrowserShooter::Commander.stubs( :timestamp ).returns( "timestamp" )
110
+ def test_click
111
+ client = mock()
112
+ element = mock()
75
113
 
76
- in_tmpdir do |tmpdir|
77
- client = stub( :capture_screenshot_to_string => read_fixture( "screenshot.base64" ) )
78
- path = "#{tmpdir}/myfile"
114
+ client.expects( :find_element ).with( "css", "css_selector" ).returns( element )
115
+ element.expects( :click )
116
+
117
+ BrowserShooter::Commander.click( client, "css_selector" )
118
+ end
79
119
 
80
- BrowserShooter::Commander.shot_system( client, path, nil )
120
+ def test_type
121
+ client = mock()
122
+ element = mock()
81
123
 
82
- assert_equal(
83
- Digest::MD5.hexdigest( Base64.decode64( read_fixture( "screenshot.base64" ) ) ),
84
- Digest::MD5.hexdigest( File.read( "#{path}_timestamp.system.png" ) )
85
- )
86
- end
124
+ client.expects( :find_element ).with( "css", "css_selector" ).returns( element )
125
+ element.expects( :send_keys ).with( "message" )
126
+
127
+ BrowserShooter::Commander.type( client, "css_selector", "message" )
87
128
  end
88
129
 
89
130
  def test_pause
data/test/driver_test.rb CHANGED
@@ -5,8 +5,7 @@ class DriverTest < Test::Unit::TestCase
5
5
  def test_run_script_on_browser
6
6
  browser = {
7
7
  "name" => "browser-name",
8
- "host" => "browser-host",
9
- "port" => "browser-port",
8
+ "url" => "url",
10
9
  "browser" => "browser-browser"
11
10
  }
12
11
 
@@ -17,18 +16,14 @@ class DriverTest < Test::Unit::TestCase
17
16
  }
18
17
 
19
18
  expected_opts = {
20
- :host => "browser-host",
21
- :port => "browser-port",
22
- :browser => "browser-browser",
23
- :url => "script-url",
24
- :timeout_in_seconds => 40
19
+ :url => "url",
20
+ :desired_capabilities => "browser-browser".to_sym
25
21
  }
26
22
 
27
- client = Object.new
28
- client.expects( :start_new_browser_session )
29
- client.expects( :close_current_browser_session )
23
+ client = mock()
24
+ client.expects( :quit )
30
25
 
31
- Selenium::Client::Driver.expects( :new ).with( expected_opts ).returns( client )
26
+ Selenium::WebDriver.expects( :for ).with( :remote, expected_opts ).returns( client )
32
27
 
33
28
  BrowserShooter::Commander.expects( :execute ).with( "one", client, "shoots-path/script-name_browser-name")
34
29
  BrowserShooter::Commander.expects( :execute ).with( "two", client, "shoots-path/script-name_browser-name")
@@ -3,10 +3,8 @@ output_path: "/tmp/output"
3
3
  scripts:
4
4
  google:
5
5
  name: "google"
6
- url: "http://www.google.de"
7
6
  commands: |
8
- open "/"
9
- window_maximize
7
+ navigate.to "http://www.google.de"
10
8
  shot 01_before
11
9
  type "id=lst-ib", "fernando guillen"
12
10
  click "name=btnG", wait_for :page
@@ -15,27 +13,22 @@ scripts:
15
13
 
16
14
  miniclip:
17
15
  name: "miniclip"
18
- url: "http://www.miniclip.com/games/de/"
19
16
  commands: |
20
- open "/"
21
- window_maximize
17
+ navigate.to "http://www.miniclip.com/games/de/"
22
18
  shot
23
19
 
24
20
  browsers:
25
21
  windows-firefox:
26
22
  name: "windows-firefox"
27
- host: 10.211.55.4
28
- port: 4444
29
- browser: "*firefox"
23
+ url: "http://10.211.55.4:4444/wd/hub"
24
+ browser: "firefox"
30
25
 
31
26
  windows-iexplore:
32
27
  name: "windows-iexploreproxy"
33
- host: 10.211.55.4
34
- port: 4444
35
- browser: "*iexploreproxy"
28
+ url: "http://10.211.55.4:4444/wd/hub"
29
+ browser: "iexploreproxy"
36
30
 
37
31
  linux-firefox:
38
32
  name: "linux-firefox"
39
- host: 10.211.55.5
40
- port: 4444
41
- browser: "*firefox"
33
+ url: "http://10.211.55.4:4444/wd/hub"
34
+ browser: "firefox"
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.3
4
+ version: 0.2.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-03 00:00:00.000000000Z
12
+ date: 2012-02-21 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
- requirement: &70323866501000 !ruby/object:Gem::Requirement
16
+ requirement: &70198251398260 !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: *70323866501000
24
+ version_requirements: *70198251398260
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70323866500500 !ruby/object:Gem::Requirement
27
+ requirement: &70198251397760 !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: *70323866500500
35
+ version_requirements: *70198251397760
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: mocha
38
- requirement: &70323866500120 !ruby/object:Gem::Requirement
38
+ requirement: &70198251397380 !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: *70323866500120
46
+ version_requirements: *70198251397380
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: selenium-webdriver
49
- requirement: &70323866499660 !ruby/object:Gem::Requirement
49
+ requirement: &70198251396920 !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: *70323866499660
57
+ version_requirements: *70198251396920
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: selenium
60
- requirement: &70323866499240 !ruby/object:Gem::Requirement
60
+ requirement: &70198251396500 !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: *70323866499240
68
+ version_requirements: *70198251396500
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: selenium-client
71
- requirement: &70323866498820 !ruby/object:Gem::Requirement
71
+ requirement: &70198251396080 !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: *70323866498820
79
+ version_requirements: *70198251396080
80
80
  description: Selenium RC wraper to create browser screenshots
81
81
  email:
82
82
  - fguillen.mail@gmail.com
@@ -95,8 +95,6 @@ files:
95
95
  - browser_shoter.gemspec
96
96
  - examples/config1.yml
97
97
  - examples/config2.yml
98
- - examples/config3.yml
99
- - examples/config4.yml
100
98
  - lib/browser_shooter.rb
101
99
  - lib/browser_shooter/commander.rb
102
100
  - lib/browser_shooter/configurator.rb
data/examples/config3.yml DELETED
@@ -1,195 +0,0 @@
1
- output_path: "~/browser_shoots"
2
-
3
- scripts:
4
- dedicated_bareplayer:
5
- name: "dedicated_bareplayer"
6
- url: "http://staging.iframe.sponsorpay.com"
7
- commands: |
8
- window_maximize
9
- window_focus
10
- open "/test/widgets/dedicated_bareplayer.html?appid=3249"
11
- pause 10
12
- click "id=play-video-link"
13
- pause 10
14
- shot
15
- shot_system
16
-
17
- dedicated_playerandreward:
18
- name: "dedicated_playerandreward"
19
- url: "http://staging.iframe.sponsorpay.com"
20
- commands: |
21
- window_maximize
22
- window_focus
23
- open "/test/widgets/dedicated_playerandreward.html?appid=3249"
24
- pause 10
25
- click "id=play-video-link"
26
- pause 10
27
- shot
28
- shot_system
29
-
30
- lightbox_bareplayer:
31
- name: "lightbox_bareplayer"
32
- url: "http://staging.iframe.sponsorpay.com"
33
- commands: |
34
- window_maximize
35
- window_focus
36
- open "/test/widgets/lightbox_bareplayer.html?appid=3249"
37
- pause 10
38
- shot
39
- shot_system
40
-
41
- lightbox_playerandreward:
42
- name: "lightbox_playerandreward"
43
- url: "http://staging.iframe.sponsorpay.com"
44
- commands: |
45
- window_maximize
46
- window_focus
47
- open "/test/widgets/lightbox_playerandreward.html?appid=3249"
48
- pause 10
49
- shot
50
- shot_system
51
-
52
- banner:
53
- name: "banner"
54
- url: "http://staging.iframe.sponsorpay.com"
55
- commands: |
56
- window_maximize
57
- window_focus
58
- open "/test/banner.html"
59
- pause 10
60
- shot
61
- shot_system
62
-
63
- banner_iframe:
64
- name: "banner_iframe"
65
- url: "http://staging.iframe.sponsorpay.com"
66
- commands: |
67
- window_maximize
68
- window_focus
69
- open "/test/banner_iframe.html"
70
- pause 10
71
- shot
72
- shot_system
73
-
74
- bar:
75
- name: "bar"
76
- url: "http://staging.iframe.sponsorpay.com"
77
- commands: |
78
- window_maximize
79
- window_focus
80
- open "/test/bar.html"
81
- pause 10
82
- shot
83
- shot_system
84
-
85
- example_banner_integration:
86
- name: "example_banner_integration"
87
- url: "http://staging.iframe.sponsorpay.com"
88
- commands: |
89
- window_maximize
90
- window_focus
91
- open "/test/example_banner_integration.html"
92
- pause 10
93
- shot
94
- shot_system
95
-
96
- example_banner_integration:
97
- name: "example_banner_integration"
98
- url: "http://staging.iframe.sponsorpay.com"
99
- commands: |
100
- window_maximize
101
- window_focus
102
- open "/test/example_banner_integration.html"
103
- pause 10
104
- shot
105
- shot_system
106
-
107
- overlay:
108
- name: "overlay"
109
- url: "http://staging.iframe.sponsorpay.com"
110
- commands: |
111
- window_maximize
112
- window_focus
113
- open "/test/overlay.html"
114
- pause 10
115
- shot
116
- shot_system
117
-
118
- overlay_right:
119
- name: "overlay_right"
120
- url: "http://staging.iframe.sponsorpay.com"
121
- commands: |
122
- window_maximize
123
- window_focus
124
- open "/test/overlay_right.html"
125
- pause 10
126
- shot
127
- shot_system
128
-
129
- video_iframe:
130
- name: "video_iframe"
131
- url: "http://staging.iframe.sponsorpay.com"
132
- commands: |
133
- window_maximize
134
- window_focus
135
- open "/test/video_iframe.html"
136
- pause 10
137
- shot
138
- shot_system
139
-
140
- video_iframe:
141
- name: "video_iframe"
142
- url: "http://staging.iframe.sponsorpay.com"
143
- commands: |
144
- window_maximize
145
- window_focus
146
- open "/test/video_iframe.html"
147
- pause 10
148
- shot
149
- shot_system
150
-
151
- widget_integration:
152
- name: "widget_integration"
153
- url: "http://staging.iframe.sponsorpay.com"
154
- commands: |
155
- window_maximize
156
- window_focus
157
- open "/test/widget_integration.html"
158
- pause 10
159
- shot
160
- shot_system
161
-
162
- widget_integration_iframed:
163
- name: "widget_integration_iframed"
164
- url: "http://staging.iframe.sponsorpay.com"
165
- commands: |
166
- window_maximize
167
- window_focus
168
- open "/test/widget_integration_iframed.html"
169
- pause 10
170
- shot
171
- shot_system
172
-
173
- widgets_integration_iframed:
174
- name: "widgets_integration_iframed"
175
- url: "http://staging.iframe.sponsorpay.com"
176
- commands: |
177
- window_maximize
178
- window_focus
179
- open "/test/widgets_integration_iframed.html"
180
- pause 10
181
- shot
182
- shot_system
183
-
184
- browsers:
185
- windows-firefox:
186
- name: "windows-firefox"
187
- host: 10.211.55.4
188
- port: 4444
189
- browser: "*firefox"
190
-
191
- windows-iexplore:
192
- name: "windows-iexploreproxy"
193
- host: 10.211.55.4
194
- port: 4444
195
- browser: "*iexploreproxy"
data/examples/config4.yml DELETED
@@ -1,43 +0,0 @@
1
- output_path: "~/browser_shooter"
2
-
3
- scripts:
4
- lightbox:
5
- name: "lightbox"
6
- url: "http://192.168.70.54:3000"
7
- commands: |
8
- open "/test/browser_shooter/lightbox_bareplayer.html"
9
- window_maximize
10
- shot_system 01_first
11
- pause 5
12
- alert
13
- click "link=Show video"
14
- pause 5
15
- shot_system 02_video
16
- select_frame "index=0"
17
- run_script "$f().play()"
18
- pause 3
19
- shot_system 03_video_start
20
- wait_for_element "css=span.enabled", :timeout_in_seconds => 15
21
- shot_system 04_green_button
22
- click "css=span.enabled"
23
- pause 8
24
- shot_system 05_spinner
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
31
-
32
- browsers:
33
- osx-firefox:
34
- name: "osx-firefox"
35
- host: 127.0.0.1
36
- port: 4444
37
- browser: "*firefox"
38
-
39
- windows-firefox:
40
- name: "windows-explorer"
41
- host: 10.211.55.4
42
- port: 4444
43
- browser: "*iehta"