sapphire 0.1.0 → 0.1.1

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.
@@ -5,8 +5,8 @@ module Sapphire
5
5
  x = self.Database.new
6
6
 
7
7
  x.Open $config[x.Connection]
8
-
9
- path = File.expand_path(self.Script, __FILE__)
8
+ y = AppConfig.Current.SqlPath || ""
9
+ path = File.expand_path(y + self.Script, __FILE__)
10
10
  file = File.open(path)
11
11
  contents = file.read
12
12
  self.Tokenize(contents)
@@ -2,8 +2,7 @@ module Sapphire
2
2
  module WebAbstractions
3
3
  class DropDown < Control
4
4
  def Selected= (value)
5
- text = self.Find
6
- text.send_keys value
5
+ Set(value)
7
6
  end
8
7
 
9
8
  def Selected
@@ -18,7 +17,10 @@ module Sapphire
18
17
 
19
18
  def Set(value)
20
19
  text = self.Find
21
- text.send_keys value
20
+ options = text.find_elements(:tag_name, "option")
21
+ selection = options.find{|o| o.text == value}
22
+ raise "could not find the value " + value if selection.nil?
23
+ selection.click
22
24
  end
23
25
  end
24
26
  end
@@ -1,3 +1,3 @@
1
1
  module Sapphire
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sapphire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-08-29 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: albacore
16
- requirement: &9396936 !ruby/object:Gem::Requirement
16
+ requirement: &9364836 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *9396936
24
+ version_requirements: *9364836
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: selenium-webdriver
27
- requirement: &9396672 !ruby/object:Gem::Requirement
27
+ requirement: &9364560 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *9396672
35
+ version_requirements: *9364560
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: activesupport
38
- requirement: &9396372 !ruby/object:Gem::Requirement
38
+ requirement: &9364296 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *9396372
46
+ version_requirements: *9364296
47
47
  description: An automated web acceptance test framework for non-technical resources
48
48
  using selenium-wedriver.
49
49
  email: