cello 0.0.30 → 0.0.31

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: 531430bbb1cfcdefa50ee7e714c642357a043817
4
- data.tar.gz: e093964da4e646baa1d0cad3800727c0945b8f86
3
+ metadata.gz: 259b79c886aa0254a0ec8d82d6c69ba6d9b2f01f
4
+ data.tar.gz: af00f7605586a46c39069923daa892cf7b2e0750
5
5
  SHA512:
6
- metadata.gz: 422a889bae038232c47ff90cda3867ead8e7ba666e7392b38595aeb44cf11103bea17779870f2df7b949757ce9e5be8f94a70f0f2ac6c11012467458ef6f15b0
7
- data.tar.gz: 03aab79b914b71ff0b356775cef4b417107d3269646eb77251cb6d92e5f2215b68d143306173e3cdb8a259b01ceca2caa8a4248ec68304457ca7f0bb9fa746cd
6
+ metadata.gz: 9f109b8a79c218623fef3ee0b0caee7d4658e39e2edb363b2f6251bdba21e7dc021791fdb80222f530278606813438d1bec40aa3188b79a2cab1575340e63f90
7
+ data.tar.gz: 3ed780ee8abd234a5195d480f50660736983a1dfba470418f96c64a30dc0760c68d6baf5454b2fe6fbfeb0a0a5833f4115f9425f027d58cbccea27ae8e468311
@@ -0,0 +1,52 @@
1
+ require "rubygems"
2
+ require "watir-webdriver"
3
+
4
+ module Cello
5
+ module PageObjects
6
+ class Hub
7
+ attr_accessor :context
8
+ attr_reader :browser
9
+
10
+ def initialize hub_url, caps
11
+ @browser =
12
+ Watir::Browser.new(
13
+ :remote,
14
+ :url => hub_url,
15
+ :desired_capabilities => caps
16
+ )
17
+ end
18
+
19
+ def visit
20
+ @context.visit
21
+ end
22
+
23
+ def context page
24
+ @context = page.new @browser
25
+ end
26
+
27
+ def search text
28
+ @browser.text.include? text
29
+ end
30
+
31
+ def close
32
+ @browser.close
33
+ end
34
+
35
+ def get_screenshot
36
+ @browser.driver.save_screenshot 'screenshot.png'
37
+ end
38
+
39
+ def title
40
+ @browser.title
41
+ end
42
+
43
+ def response_time
44
+ #pending
45
+ end
46
+
47
+ def method_missing method_name, *arguments
48
+ @context.send method_name, *arguments
49
+ end
50
+ end
51
+ end
52
+ end
data/lib/cello/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cello
2
- VERSION = "0.0.30"
2
+ VERSION = "0.0.31"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cello
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.30
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camilo Ribeiro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-29 00:00:00.000000000 Z
11
+ date: 2015-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov
@@ -226,6 +226,7 @@ files:
226
226
  - lib/cello/pageobjects/html_elements/span_helper.rb
227
227
  - lib/cello/pageobjects/html_elements/textarea_helper.rb
228
228
  - lib/cello/pageobjects/html_elements/textfield_helper.rb
229
+ - lib/cello/pageobjects/hub.rb
229
230
  - lib/cello/pageobjects/iframe.rb
230
231
  - lib/cello/pageobjects/page.rb
231
232
  - lib/cello/pageobjects/recorder.rb