pyrite 0.5.4 → 0.5.5
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/lib/pyrite/dsl.rb +6 -6
- metadata +3 -3
data/lib/pyrite/dsl.rb
CHANGED
@@ -6,7 +6,7 @@ module Pyrite
|
|
6
6
|
if element.match /date/ # Try to guess at date selects
|
7
7
|
select_date(element, value)
|
8
8
|
else
|
9
|
-
browser.type(element, value)
|
9
|
+
browser.type("css=#{element}", value)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
@@ -20,9 +20,9 @@ module Pyrite
|
|
20
20
|
:minute => '5i'
|
21
21
|
}
|
22
22
|
date = value.respond_to?(:year) ? value : Date.parse(value)
|
23
|
-
browser.select "
|
24
|
-
browser.select "
|
25
|
-
browser.select "
|
23
|
+
browser.select "css=#{element}_#{suffixes[:year]}", date.year
|
24
|
+
browser.select "css=#{element}_#{suffixes[:month]}", date.strftime('%B')
|
25
|
+
browser.select "css=#{element}_#{suffixes[:day]}", date.day
|
26
26
|
end
|
27
27
|
|
28
28
|
# Open a URL
|
@@ -43,7 +43,7 @@ module Pyrite
|
|
43
43
|
|
44
44
|
# Check a chek box or toggle a radio button
|
45
45
|
def check(locator)
|
46
|
-
browser.check(locator)
|
46
|
+
browser.check("css=#{locator}")
|
47
47
|
end
|
48
48
|
|
49
49
|
# Click anything else
|
@@ -53,7 +53,7 @@ module Pyrite
|
|
53
53
|
|
54
54
|
# Pick an option from a select element
|
55
55
|
def select(element, option)
|
56
|
-
browser.select(element, option)
|
56
|
+
browser.select("css=#{element}", option)
|
57
57
|
end
|
58
58
|
|
59
59
|
# Wait for a specific element or the page to load
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
8
|
+
- 5
|
9
|
+
version: 0.5.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Adam Rogers
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-04-
|
18
|
+
date: 2010-04-27 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|