Skip to content

Commit f4ee985

Browse files
committed
Fix assertions in test-switch-default-locator
1 parent 05b8854 commit f4ee985

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/etaoin/api_test.clj

+5-7
Original file line numberDiff line numberDiff line change
@@ -961,15 +961,13 @@
961961
(is (= (vec tag-names)
962962
["div" "b" "p" "span"])))))
963963

964-
(deftest test-switch-default-locators
964+
(deftest test-switch-default-locator
965965
(testing "xpath locator"
966-
(let [driver (e/use-xpath *driver*)
967-
text (e/get-element-text driver {:class :target})]
968-
(is (= "target-1" text))))
966+
(let [driver (e/use-xpath *driver*)]
967+
(is (= "target-1" (e/get-element-text driver ".//*[@class='target']")))))
969968
(testing "css locator"
970-
(let [driver (e/use-css *driver*)
971-
text (e/get-element-text driver {:class :target})]
972-
(is (= "target-1" text)))))
969+
(let [driver (e/use-css *driver*)]
970+
(is (= "target-1" (e/get-element-text driver ".target"))))))
973971

974972
(deftest test-fn-index
975973
(testing ":fn/index"

0 commit comments

Comments
 (0)