This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Enhance frame-handling documentation on functions

  • Loading branch information...
1 parent ecde684 commit fada2ef043251680d62db36f9174b9a6eb2afe4d @semperos committed Oct 4, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −1 src/clj_webdriver/core.clj
  2. +3 −2 src/clj_webdriver/taxi.clj
@@ -59,7 +59,7 @@
(window [driver] "Get the only (or first) window")
(windows [driver] "Retrieve a vector of `Window` records which can be used to switch to particular open windows")
(other-windows [driver] "Retrieve window handles for all windows except the current one")
- (switch-to-frame [driver frame] "Switch focus to a particular HTML frame")
+ (switch-to-frame [driver frame] "Switch focus to a particular HTML frame by supplying an `Element` or an integer for the nth frame on the page (zero-based index)")
(switch-to-window [driver handle] "Switch focus to a particular open window")
(switch-to-other-window [driver] "Given that two and only two browser windows are open, switch to the one not currently active")
(switch-to-default [driver] "Switch focus to the first first frame of the page, or the main document if the page contains iframes")
@@ -459,12 +459,13 @@
;; TODO: test coverage
(defn switch-to-frame
- "Switch focus to the frame specified by `frame-q`, which is a standard Taxi element query or an integer for the order (index) of the frame on the page.
+ "Switch focus to the frame specified by `frame-q`, which is a standard Taxi element query or an integer for the order (zero-based index) of the frame on the page.
Examples:
=========
- (switch-to-frame \"#target-frame\")"
+ (switch-to-frame \"#target-frame\")
+ (switch-to-frame 1)"
([frame-q] (switch-to-frame *driver* frame-q))
([driver frame-q]
(let [frame (if (number? frame-q)

0 comments on commit fada2ef

Please sign in to comment.