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 +4 -4
- data/lib/cello/pageobjects/hub.rb +52 -0
- data/lib/cello/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 259b79c886aa0254a0ec8d82d6c69ba6d9b2f01f
|
4
|
+
data.tar.gz: af00f7605586a46c39069923daa892cf7b2e0750
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.
|
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-
|
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
|