pyrite 0.6.2 → 0.6.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 +11 -11
  2. metadata +4 -4
@@ -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("css=#{element}", value)
9
+ browser.type("jquery=#{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 "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
23
+ browser.select "jquery=#{element}_#{suffixes[:year]}", date.year
24
+ browser.select "jquery=#{element}_#{suffixes[:month]}", date.strftime('%B')
25
+ browser.select "jquery=#{element}_#{suffixes[:day]}", date.day
26
26
  end
27
27
 
28
28
  # Open a URL
@@ -38,22 +38,22 @@ module Pyrite
38
38
 
39
39
  # Press an submit (not button) input based on its text
40
40
  def press(text)
41
- browser.click("css=input[type=submit][value='#{text}']")
41
+ browser.click("jquery=input[type=submit][value='#{text}']")
42
42
  end
43
43
 
44
44
  # Check a chek box or toggle a radio button
45
45
  def check(locator)
46
- browser.check("css=#{locator}")
46
+ browser.check("jquery=#{locator}")
47
47
  end
48
48
 
49
49
  # Click anything else
50
50
  def click(locator)
51
- browser.click("css=#{locator}")
51
+ browser.click("jquery=#{locator}")
52
52
  end
53
53
 
54
54
  # Pick an option from a select element
55
55
  def select(element, option)
56
- browser.select("css=#{element}", option)
56
+ browser.select("jquery=#{element}", option)
57
57
  end
58
58
 
59
59
  # Wait for a specific element, the page to load
@@ -65,7 +65,7 @@ module Pyrite
65
65
  when :ajax
66
66
  browser.wait_for(:wait_for => :ajax, :javascript_framework => Pyrite.js_framework)
67
67
  else
68
- browser.wait_for(:element => "css=#{element}")
68
+ browser.wait_for(:element => "jquery=#{element}")
69
69
  end
70
70
  end
71
71
 
@@ -97,11 +97,11 @@ module Pyrite
97
97
  browser.get_confirmation
98
98
  end
99
99
 
100
- # drag an css selector to the center pixel of another, e.g.
100
+ # drag an jquery selector to the center pixel of another, e.g.
101
101
  # `drag_and_drop(:from => "li#element_#{my_oject.id}", :to => "div#trash")
102
102
  # ProTip: if you have a list of elements you wish to re-order, drag the top element down.
103
103
  def drag_and_drop(opts={})
104
- browser.drag_and_drop_to_object("css=#{opts[:from]}", "css=#{opts[:to]}")
104
+ browser.drag_and_drop_to_object("jquery=#{opts[:from]}", "jquery=#{opts[:to]}")
105
105
  end
106
106
 
107
107
  # Capture the page and try to open it
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pyrite
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 2
10
- version: 0.6.2
9
+ - 5
10
+ version: 0.6.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Adam Rogers
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-07-15 00:00:00 +01:00
19
+ date: 2010-07-20 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency