pyrite 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/pyrite/dsl.rb +6 -6
  2. metadata +3 -3
@@ -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 "#{element}_#{suffixes[:year]}", date.year
24
- browser.select "#{element}_#{suffixes[:month]}", date.strftime('%B')
25
- browser.select "#{element}_#{suffixes[:day]}", date.day
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
- - 4
9
- version: 0.5.4
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-21 00:00:00 +01:00
18
+ date: 2010-04-27 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency