This file contains hidden or 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
require 'operawatir/helper' | |
describe 'Frames in Watir 3' do | |
it 'as a block' do | |
window.frame(:id => 'foo') do |frame| | |
frame.p(:id => 'bar').should include 'bar' | |
end | |
end |
This file contains hidden or 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
require 'rubygems' | |
require 'deprecated' | |
class Foo | |
include Deprecated | |
def foo | |
"foo" | |
end |
This file contains hidden or 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
require 'watir-webdriver' | |
browser = Watir::Browser.new :firefox | |
browser.goto 'http://www.carritus.com/' | |
browser.span(:text => 'Bebidas').when_present.click | |
browser.span(:text => 'Cervezas').click | |
browser.span(:text => "Importación").click | |
puts browser.url |
This file contains hidden or 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
.//input[(not(@type) or (@type!="file" and @type!="radio" and @type!="checkbox" and @type!="submit" and @type="reset" and @type!="image" and @type!="button" and @type!="hidden" and @type!="url" and @type!="datetime" and @type!="date" and @type!="month" and @type!="week" and @type!="time" and @type!="datetime-local" and @type!="range" and @type!="color")) and @name='q'] | .//textarea[@name='q'] |
This file contains hidden or 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
require 'rubygems' | |
require 'operawatir' | |
browser = OperaWatir::Browser.new | |
browser.goto 'http://maps.google.com/?hl=en' | |
puts 'Find the search box' | |
search = browser.text_field(:id, 'q_d') | |
puts 'Type text and submit the form' |
This file contains hidden or 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
import com.opera.core.systems.OperaDriver; | |
import com.opera.core.systems.OperaWebElement; | |
import org.openqa.selenium.By; | |
//import org.openqa.selenium.WebElement; | |
public class MyTest { | |
public static void main(String[] args) throws InterruptedException { | |
OperaDriver driver = new OperaDriver(); |
This file contains hidden or 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
input-button.rb: | |
OS X: | |
Finished in 10.19 seconds | |
35 examples, 7 failures | |
operawatir input-button.rb 11.47s user 0.90s system 81% cpu 15.137 total | |
GNU/Linux: |
This file contains hidden or 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
require 'operawatir/helper' | |
describe 'OperaWatir' do | |
describe 'Browser' do | |
describe '#select_list' do | |
before :each do | |
browser.goto 'http://t/core/standards/wf1/interactive/button-type-reset-012.html' | |
@select_list = browser.select_list(:name, 'test') | |
@reset = browser.button(:name, 'reset') | |
end |
This file contains hidden or 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
require 'rubygems' | |
require 'operawatir' | |
describe OperaWatir do | |
before(:all) do | |
OperaWatir.api = 3 | |
@browser = OperaWatir::Browser.new | |
@browser.url = 'http://people.opera.com/weic/temp/wml.wml' | |
@window = @browser.active_window | |
end |