bewildr 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ require 'cucumber/rake/task'
10
10
 
11
11
  spec = Gem::Specification.new do |s|
12
12
  s.name = 'bewildr'
13
- s.version = '0.1.12'
13
+ s.version = '0.1.13'
14
14
  s.has_rdoc = true
15
15
  s.extra_rdoc_files = ['README.rdoc', 'LICENSE']
16
16
  s.summary = 'Test WPF UI apps with IronRuby'
@@ -11,6 +11,11 @@ module Bewildr
11
11
  end
12
12
  private :initialize
13
13
 
14
+ #Returns the underlying process wrapped by this Application object
15
+ def process
16
+ @proc
17
+ end
18
+
14
19
  #Returns the id of the underlying process
15
20
  def proc_id
16
21
  running? ? @proc.id.to_i : nil
@@ -96,6 +101,11 @@ module Bewildr
96
101
  Bewildr::Application.new(System::Diagnostics::Process.get_processes_by_name(process_name).first)
97
102
  end
98
103
 
104
+ #Returns a Bewildr::Application wrapping a process already in memory where the argument is the process id
105
+ def self.attach_to_process_id(process_id)
106
+ Bewildr::Application.new(System::Diagnostics::Process.get_process_by_id(process_id))
107
+ end
108
+
99
109
  #Returns a Bewildr::Application wrapping a process already in memory where the argument is the process object to be wrapped
100
110
  def self.attach_to_process(process)
101
111
  Bewildr::Application.new(process)
@@ -61,7 +61,7 @@ module Bewildr
61
61
  expand_combo
62
62
  collapse_combo
63
63
  #get_selection.first
64
- get_selection.first.name
64
+ get_selection.first
65
65
  end
66
66
 
67
67
  #Expands the combobox
@@ -49,7 +49,7 @@ module Bewildr
49
49
  #Returns the selected list item
50
50
  def selected
51
51
  return nil if get_selection.empty?
52
- get_selection.first.name
52
+ get_selection.first
53
53
  end
54
54
  end
55
55
  end
@@ -64,13 +64,14 @@ module Bewildr
64
64
  @automation_element.current.is_enabled
65
65
  end
66
66
 
67
- #Waits up to 30 seconds for a descendant of this element to exist that meets the search criteria
67
+ #Waits up to 30 seconds for a descendant of this element to exist that meets the search criteria, returns the element if found
68
68
  def wait_for_existence_of(condition_hash)
69
69
  Timeout.timeout(30) do
70
70
  sleep 0.1 until contains?(condition_hash)
71
71
  end
72
72
  get(condition_hash)
73
73
  end
74
+ alias :wait_for :wait_for_existence_of
74
75
 
75
76
  #Waits for up to 30 seconds for this element to no longer have a descendant element that meest the criteria
76
77
  def wait_for_non_existence_of(condition_hash)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bewildr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 12
10
- version: 0.1.12
9
+ - 13
10
+ version: 0.1.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nat Ritmeyer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-26 00:00:00 +01:00
18
+ date: 2011-07-05 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency