Skip to content

Commit

Permalink
Guard parent_frame spec for Safari and PhantomJS
Browse files Browse the repository at this point in the history
  • Loading branch information
jarib committed Jun 25, 2014
1 parent 6c0f399 commit bd3bc03
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions rb/spec/integration/selenium/webdriver/target_locator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@
end
end

it "should switch to parent frame" do
driver.navigate.to url_for("iframes.html")
not_compliant_on :browser => [:safari, :phantomjs] do
it "should switch to parent frame" do
driver.navigate.to url_for("iframes.html")

iframe = driver.find_element(:tag_name => "iframe")
driver.switch_to.frame(iframe)
iframe = driver.find_element(:tag_name => "iframe")
driver.switch_to.frame(iframe)

driver.find_element(:name, 'login').should be_kind_of(WebDriver::Element)
driver.find_element(:name, 'login').should be_kind_of(WebDriver::Element)

driver.switch_to.parent_frame
driver.find_element(:id, 'iframe_page_heading').should be_kind_of(WebDriver::Element)
driver.switch_to.parent_frame
driver.find_element(:id, 'iframe_page_heading').should be_kind_of(WebDriver::Element)
end
end

# switching by name not yet supported by safari
Expand Down

0 comments on commit bd3bc03

Please sign in to comment.