Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
line ending fix probably done by git
- Loading branch information
wolfdancer
committed
Aug 29, 2008
1 parent
635238d
commit 6307194
Showing
49 changed files
with
2,026 additions
and
2,026 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.