Skip to content

Commit

Permalink
JariBakken: Update URLs in the RC integration specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jarib committed Jan 21, 2013
1 parent 16134c0 commit 87b2c0f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe "Backward Compatible API" do
it "provides legacy driver methods" do
page.open "http://localhost:4444/selenium-server/tests/html/test_click_page1.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_click_page1.html"

page.get_title.should eql("Click Page 1")
page.get_text("link").index("Click here for next page").should_not be_nil
Expand All @@ -13,10 +13,10 @@

page.click "link"
page.wait_for_page_to_load 5000
page.get_location.should =~ %r"/selenium-server/tests/html/test_click_page2.html"
page.get_location.should =~ %r"/selenium-server/org/openqa/selenium/tests/html/test_click_page2.html"

page.click "previousPage"
page.wait_for_page_to_load 5000
page.get_location.should =~ %r"/selenium-server/tests/html/test_click_page1.html"
page.get_location.should =~ %r"/selenium-server/org/openqa/selenium/tests/html/test_click_page1.html"
end
end
4 changes: 2 additions & 2 deletions rb/spec/integration/selenium/client/api/click_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe "Click Instrumentation" do
it "clicks" do
page.open "http://localhost:4444/selenium-server/tests/html/test_click_page1.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_click_page1.html"
page.text_content("link").should eql("Click here for next page")

page.click "link", :wait_for => :page
Expand Down Expand Up @@ -31,7 +31,7 @@
end

it "double clicks" do
page.open "http://localhost:4444/selenium-server/tests/html/test_click_page1.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_click_page1.html"
page.double_click "doubleClickable"

page.get_alert.should eql("double clicked!")
Expand Down
16 changes: 8 additions & 8 deletions rb/spec/integration/selenium/client/api/cookie_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@

describe "Cookie Handling" do
it "deletes all cookies" do
page.open "http://localhost:4444/selenium-server/tests/html/path1/cookie1.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/path1/cookie1.html"
page.delete_all_visible_cookies

page.cookies.should be_empty

page.open "http://localhost:4444/selenium-server/tests/html/path2/cookie2.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/path2/cookie2.html"
page.delete_all_visible_cookies

page.cookies.should be_empty
end

it "can set cookies" do
page.open "http://localhost:4444/selenium-server/tests/html/path1/cookie1.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/path1/cookie1.html"
page.create_cookie "addedCookieForPath1=new value1"
page.create_cookie "addedCookieForPath2=new value2", :path => "/selenium-server/tests/html/path2/", :max_age => 60
page.open "http://localhost:4444/selenium-server/tests/html/path1/cookie1.html"
page.create_cookie "addedCookieForPath2=new value2", :path => "/selenium-server/org/openqa/selenium/tests/html/path2/", :max_age => 60
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/path1/cookie1.html"
page.cookies.should =~ /addedCookieForPath1=new value1/

page.cookie?("addedCookieForPath1").should be_true
page.cookie("addedCookieForPath1").should eql("new value1")
page.cookie?("testCookie").should be_false
page.cookie?("addedCookieForPath2").should be_false

page.delete_cookie "addedCookieForPath1", "/selenium-server/tests/html/path1/"
page.delete_cookie "addedCookieForPath1", "/selenium-server/org/openqa/selenium/tests/html/path1/"
page.cookies.should be_empty

page.open "http://localhost:4444/selenium-server/tests/html/path2/cookie2.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/path2/cookie2.html"
page.cookie("addedCookieForPath2").should eql("new value2")
page.cookie?("addedCookieForPath1").should be_false

page.delete_cookie "addedCookieForPath2", "/selenium-server/tests/html/path2/"
page.delete_cookie "addedCookieForPath2", "/selenium-server/org/openqa/selenium/tests/html/path2/"
page.delete_cookie "addedCookieForPath2"
page.cookies.should be_empty
end
Expand Down
2 changes: 1 addition & 1 deletion rb/spec/integration/selenium/client/api/element_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe "Element API" do
it "can detect element presence" do
page.open "http://localhost:4444/selenium-server/tests/html/test_element_present.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_element_present.html"
page.element?('aLink').should be_true

page.click 'removeLinkAfterAWhile', :wait_for => :no_element, :element => "aLink"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
# end
#
# it "can retrieve logs even when no command were issued" do
# page.open "http://localhost:4444/selenium-server/tests/html/test_click_page1.html"
# page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_click_page1.html"
# logs = selenium_driver.retrieve_last_remote_control_logs
#
# logs.should =~ %r{request: getNewBrowserSession\[\*[a-z0-9]+, http://localhost:4567, , \]}
# logs.should =~ %r{request: open\[http://localhost:4444/selenium-server/tests/html/test_click_page1.html, \]}
# logs.should =~ %r{request: open\[http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_click_page1.html, \]}
# logs.should =~ %r{request: retrieveLastRemoteControlLogs\[, \]}
# logs.should =~ %r{org.openqa.selenium.server.SeleniumDriverResourceHandler - Got result: OK}
# end
#
# it "can retrieve logs even when commands were issued" do
# page.open "http://localhost:4444/selenium-server/tests/html/test_click_page1.html"
# page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_click_page1.html"
# page.get_title
# logs = selenium_driver.retrieve_last_remote_control_logs
#
# logs.should =~ %r{request: getNewBrowserSession\[\*[a-z0-9]+, http://localhost:4567, , \]}
# logs.should =~ %r{request: open\[http://localhost:4444/selenium-server/tests/html/test_click_page1.html, \]}
# logs.should =~ %r{request: open\[http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_click_page1.html, \]}
# logs.should =~ %r{request: getTitle\[, \]}
# logs.should =~ %r{request: retrieveLastRemoteControlLogs\[, \]}
# logs.should =~ %r{org.openqa.selenium.server.SeleniumDriverResourceHandler - Got result: OK}
Expand Down
6 changes: 3 additions & 3 deletions rb/spec/integration/selenium/client/api/screenshot_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

describe "Screenshot" do
it "can capture html for current page" do
page.open "http://localhost:4444/selenium-server/tests/html/test_click_page1.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_click_page1.html"
page.get_html_source.should =~ /<head>/
end

it "captures PNG screenshot OS viewport as a file on Selenium RC local filesystem" do
tempfile = File.join(Dir.tmpdir, "selenium_screenshot.png")

page.open "http://localhost:4444/selenium-server/tests/html/test_click_page1.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_click_page1.html"
page.capture_screenshot tempfile

File.exists?(tempfile).should be_true
Expand All @@ -20,7 +20,7 @@
end

it "captures PNG screenshot OS viewport as a Base64 encoded PNG image" do
page.open "http://localhost:4444/selenium-server/tests/html/test_click_page1.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_click_page1.html"
encodedImage = page.capture_screenshot_to_string
pngImage = Base64.decode64(encodedImage)

Expand Down
6 changes: 3 additions & 3 deletions rb/spec/integration/selenium/client/api/select_window_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe "Window Selection" do
it "selects and close popup windows" do
page.open "http://localhost:4444/selenium-server/tests/html/test_select_window.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_select_window.html"
page.click "popupPage", :wait_for => :popup, :window => "myPopupWindow", :select => true

page.location.should =~ %r{/tests/html/test_select_window_popup.html}
Expand All @@ -25,7 +25,7 @@
end

it "select an anonymous window (one that isn't assigned to a variable)" do
page.open "http://localhost:4444/selenium-server/tests/html/test_select_window.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_select_window.html"
page.click "popupAnonymous", :wait_for => :popup, :window => "anonymouspopup", :select => true

page.location.should =~ %r{/tests/html/test_select_window_popup.html}
Expand All @@ -35,7 +35,7 @@
end

it "handles an onclick close handler" do
page.open "http://localhost:4444/selenium-server/tests/html/test_select_window.html"
page.open "http://localhost:4444/selenium-server/org/openqa/selenium/tests/html/test_select_window.html"
page.click "popupAnonymous", :wait_for => :popup, :window => "anonymouspopup", :select => true

page.location.should =~ %r{/tests/html/test_select_window_popup.html}
Expand Down

0 comments on commit 87b2c0f

Please sign in to comment.