Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix frame locator in Frame#attach_command

Fixes Issue 45.
  • Loading branch information...
commit e88eb5cf9298d7134cde4e4b6b3486c7baa9962e 1 parent 83590f5
Justin Ko authored
Showing with 18 additions and 1 deletion.
  1. +1 −1  lib/watir-classic/frame.rb
  2. +17 −0 spec/frame.rb
View
2  lib/watir-classic/frame.rb
@@ -40,7 +40,7 @@ def document
end
def attach_command
- @container.page_container.attach_command + ".frame(#{@specifiers.inspect})".gsub('"','\'')
+ @container.page_container.attach_command + ".frame(:unique_number => #{unique_number})"
end
end
View
17 spec/frame.rb
@@ -0,0 +1,17 @@
+# encoding: utf-8
+require File.expand_path("watirspec/spec_helper", File.dirname(__FILE__))
+
+describe "Frame" do
+ before :each do
+ browser.goto(WatirSpec.url_for("frames.html"))
+ end
+
+ it "handles clicking elements without waiting" do
+ browser.frame(:id, "frame_1").text_field(:name, 'senderElement').value.should == 'send_this_value'
+ browser.frame(:id, "frame_2").text_field(:name, 'recieverElement').value.should == 'old_value'
+ browser.frame(:id, "frame_1").button(:id, 'send').click_no_wait
+ browser.frame(:id, "frame_2").text_field(:name, 'recieverElement').value.should == 'old_value'
+ browser.frame(:id, "frame_2").text_field(:name => 'recieverElement', :text => 'send_this_value').wait_until_present(10).should_not raise_error(Watir::Wait::TimeoutError)
+ end
+
+end
Please sign in to comment.
Something went wrong with that request. Please try again.