Skip to content

Commit

Permalink
line ending fix probably done by git
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfdancer committed Aug 29, 2008
1 parent 635238d commit 6307194
Show file tree
Hide file tree
Showing 49 changed files with 2,026 additions and 2,026 deletions.
10 changes: 5 additions & 5 deletions .buildpath
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path="spec"/>
<buildpathentry kind="src" path="lib"/>
</buildpath>
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path="spec"/>
<buildpathentry kind="src" path="lib"/>
</buildpath>
46 changes: 23 additions & 23 deletions .project
@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>selenium</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.dltk.core.scriptbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.rubypeople.rdt.core.rubybuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.rubypeople.rdt.core.rubynature</nature>
<nature>org.eclipse.dltk.ruby.core.nature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>selenium</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.dltk.core.scriptbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.rubypeople.rdt.core.rubybuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.rubypeople.rdt.core.rubynature</nature>
<nature>org.eclipse.dltk.ruby.core.nature</nature>
</natures>
</projectDescription>
32 changes: 16 additions & 16 deletions README
@@ -1,17 +1,17 @@
= Selenium Ruby[http://selenium.rubyforge.org] - Object-oriented testing with selenium
Homepage:: http://selenium.rubyforge.org
Author:: Shane
Copyright:: (c) 2006 Selenium-Ruby on rubyforge
License:: Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
Selenium Ruby[http://selenium.rubyforge.org] is a project that wraps selenium-rc[http://www.openqa.org/selenium-rc/]
into an object-oriented way, and wraps it into a RubyGem.
This rDoc is intended for you the check out the available methods on the objects. For a full
document of what Selenium can do for you, please check out the home page:
http://selenium.rubyforge.org
For document on the Selenium project and its RC, see Selenium homepage: http://www.openqa.org/selenium
= Selenium Ruby[http://selenium.rubyforge.org] - Object-oriented testing with selenium

Homepage:: http://selenium.rubyforge.org
Author:: Shane
Copyright:: (c) 2006 Selenium-Ruby on rubyforge
License:: Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)

Selenium Ruby[http://selenium.rubyforge.org] is a project that wraps selenium-rc[http://www.openqa.org/selenium-rc/]
into an object-oriented way, and wraps it into a RubyGem.

This rDoc is intended for you the check out the available methods on the objects. For a full
document of what Selenium can do for you, please check out the home page:
http://selenium.rubyforge.org

For document on the Selenium project and its RC, see Selenium homepage: http://www.openqa.org/selenium

Please post your question at mailing-list.
8 changes: 4 additions & 4 deletions bin/selenium
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
require 'selenium'

#!/usr/bin/env ruby
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../lib"))
require 'selenium'

Selenium::SeleniumServer.run(ARGV)
28 changes: 14 additions & 14 deletions lib/selenium/alert.rb
@@ -1,15 +1,15 @@
module Selenium
class Alert
def initialize(webpage)
@webpage = webpage
end

def present?
@webpage.alert_present?
end

def message
@webpage.alert_message
end
end
module Selenium
class Alert
def initialize(webpage)
@webpage = webpage
end

def present?
@webpage.alert_present?
end

def message
@webpage.alert_message
end
end
end
8 changes: 4 additions & 4 deletions lib/selenium/auto_it.rb
@@ -1,4 +1,4 @@
require 'win32ole'
require 'selenium/auto_it_driver'
require 'selenium/auto_it_window'
require 'selenium/file_upload'
require 'win32ole'
require 'selenium/auto_it_driver'
require 'selenium/auto_it_window'
require 'selenium/file_upload'
88 changes: 44 additions & 44 deletions lib/selenium/auto_it_driver.rb
@@ -1,45 +1,45 @@
module Selenium
class AutoIt
@@autoit = nil

def self.load
begin
@@autoit = load_instance
rescue WIN32OLERuntimeError
registerAutoItDll
@@autoit = load_instance
end
@@autoit
end

def self.load_instance
@@autoit = WIN32OLE.new('AutoItX3.Control') unless @@autoit
@@autoit
end

def self.reset
if @@autoit
@@autoit.ole_free
@@autoit =nil
system("regsvr32.exe /s /u #{dll}")
end
end

def self.registerAutoItDll
system("regsvr32.exe /s #{dll}")
end

def self.dll
File.join(File.dirname(__FILE__), 'autoit', 'AutoItX3.dll')
end

def initialize
@autoit = AutoIt.load
end

def on_window_active(title, text = nil)
@autoit.WinWaitActive(title, text, 30)
yield @@autoit
end
end
module Selenium
class AutoIt
@@autoit = nil

def self.load
begin
@@autoit = load_instance
rescue WIN32OLERuntimeError
registerAutoItDll
@@autoit = load_instance
end
@@autoit
end

def self.load_instance
@@autoit = WIN32OLE.new('AutoItX3.Control') unless @@autoit
@@autoit
end

def self.reset
if @@autoit
@@autoit.ole_free
@@autoit =nil
system("regsvr32.exe /s /u #{dll}")
end
end

def self.registerAutoItDll
system("regsvr32.exe /s #{dll}")
end

def self.dll
File.join(File.dirname(__FILE__), 'autoit', 'AutoItX3.dll')
end

def initialize
@autoit = AutoIt.load
end

def on_window_active(title, text = nil)
@autoit.WinWaitActive(title, text, 30)
yield @@autoit
end
end
end
164 changes: 82 additions & 82 deletions lib/selenium/auto_it_window.rb
@@ -1,82 +1,82 @@
class AutoItWindow
def initialize(autoit, title, text=nil)
@autoit = autoit
@title = title
@text = text
end

def self.wait_for(autoit, title, text = nil)
window = self.new(autoit, title, text)
window.wait_for_appear
window
end

def self.on_activation(autoit, title, text = nil)
window = wait_for(autoit, title, text)
yield window
end

def wait_for_activation
@autoit.WinWaitActive(@title, @text, 30)
end

def wait_for_appear
@autoit.WinWait(@title, @text, 30)
end

def activate
@autoit.WinActivate(@title, @text)
end

def active?
1 == @autoit.WinActive(@title, @text)
end

def state
AutoItWindowState.new(@autoit.WinGetState(@title, @text))
end

def send_keys(keys)
activate_if_needed
@autoit.Send(keys)
end

def close
@autoit.WinClose(@title)
end

def activate_if_needed
winstate = state
activate unless winstate.active?
end
end

class AutoItWindowState
def initialize(state)
@state = state
end

def exists?
@state & 1 > 0
end

def visible?
@state & 2 > 0
end

def enabled?
@state & 4 > 0
end

def active?
@state & 8 > 0
end

def minimized?
@state & 16 > 0
end

def maxmized?
@state & 32 > 0
end
end
class AutoItWindow
def initialize(autoit, title, text=nil)
@autoit = autoit
@title = title
@text = text
end

def self.wait_for(autoit, title, text = nil)
window = self.new(autoit, title, text)
window.wait_for_appear
window
end

def self.on_activation(autoit, title, text = nil)
window = wait_for(autoit, title, text)
yield window
end

def wait_for_activation
@autoit.WinWaitActive(@title, @text, 30)
end

def wait_for_appear
@autoit.WinWait(@title, @text, 30)
end

def activate
@autoit.WinActivate(@title, @text)
end

def active?
1 == @autoit.WinActive(@title, @text)
end

def state
AutoItWindowState.new(@autoit.WinGetState(@title, @text))
end

def send_keys(keys)
activate_if_needed
@autoit.Send(keys)
end

def close
@autoit.WinClose(@title)
end

def activate_if_needed
winstate = state
activate unless winstate.active?
end
end

class AutoItWindowState
def initialize(state)
@state = state
end

def exists?
@state & 1 > 0
end

def visible?
@state & 2 > 0
end

def enabled?
@state & 4 > 0
end

def active?
@state & 8 > 0
end

def minimized?
@state & 16 > 0
end

def maxmized?
@state & 32 > 0
end
end

0 comments on commit 6307194

Please sign in to comment.