Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tweak name of intersect*? to intersect*? and fix doc string

  • Loading branch information...
commit 912d1543c0df988c4095af970ad2196c5b0f18c6 1 parent fef5d63
@semperos authored
View
4 src/clj_webdriver/core.clj
@@ -90,7 +90,7 @@
(flash [element] "Flash the element in question, to verify you're looking at the correct element")
(focus [element] "Apply focus to the given element")
(html [element] "Retrieve the outer HTML of an element")
- (intersect*? [element-a element-b] "Return true if any of the `elements` intersect the first `element`.")
+ (intersects*? [element-a element-b] "Return true if `element-a` intersects with `element-b`. This mirrors the Selenium-WebDriver API method, but see the `intersect?` function to compare an element against multiple other elements for intersection.")
(location [element] "Given an element object, return its location as a map of its x/y coordinates")
(location-once-visible [element] "Given an element object, return its location on the screen once it is scrolled into view as a map of its x/y coordinates. The window will scroll as much as possible until the element hits the top of the page; thus even visible elements will be scrolled until they reach that point.")
(present? [element] "Returns true if the element exists and is visible")
@@ -269,7 +269,7 @@
(defn intersect?
"Return truthy based on whether or not the first element intersects with any of the subsequent elements."
[element & elements]
- (some true? (map #(intersect*? element %) elements)))
+ (some true? (map #(intersects*? element %) elements)))
;; Key codes for non-representable keys
(defn key-code
View
4 src/clj_webdriver/core_element.clj
@@ -94,7 +94,7 @@
(:width el-size)
(:height el-size))))
- (intersect*? [element-a element-b]
+ (intersects*? [element-a element-b]
(let [rect-a (rectangle element-a)
rect-b (rectangle element-b)]
(.intersects rect-a rect-b)))
@@ -287,7 +287,7 @@
(rectangle [m] (rectangle (map->Element m)))
- (intersect*? [m-a m-b] (intersect*? (map->Element m-a) (map->Element m-b)))
+ (intersects*? [m-a m-b] (intersects*? (map->Element m-a) (map->Element m-b)))
(tag [m] (tag (map->Element m)))
Please sign in to comment.
Something went wrong with that request. Please try again.