Browse files

Added a clickAndWaitForPageToLoad method. This is something we implem…

…ented on our end for our C# tests and has worked quite nicely. It eliminates the need to call the click and waitForPageToLoad method seperately, in certain situations.
  • Loading branch information...
bryanmikaelian committed Jun 22, 2011
1 parent 3ec0787 commit f8832b0e71fa8af3c2068fe7eeee1f2f0b32b8d2
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/selenium/client/legacy_driver.rb
@@ -144,6 +144,15 @@ module GeneratedDriver
def click(locator)
remote_control_command("click", [locator,])
+ # Clicks on a link, button, checkbox or radio button and waits for the new
+ # page to load. The default timeout is 5000 milliseconds
+ #
+ # 'locator' is an element locator
+ def clickAndWaitForPageToLoad(locator, timeout=5000)
+ remote_control_command("click", [locator,])
+ waitForPageToLoad(timeout)
+ end
# Double clicks on a link, button, checkbox or radio button. If the double click action

0 comments on commit f8832b0

Please sign in to comment.