Skip to content

Instantly share code, notes, and snippets.

@noidi
Created August 6, 2012 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noidi/23130a526bc8bdd400c7 to your computer and use it in GitHub Desktop.
Save noidi/23130a526bc8bdd400c7 to your computer and use it in GitHub Desktop.
;; Original:
;; driver.switchTo().frame("foo");
;; WebElement editable = driver.switchTo().activeElement();
;; editable.sendKeys("Your text here");
;; Direct translation:
(let [driver (:webdriver *driver*)]
(-> driver .switchTo (.frame "foo"))
(let [editable (-> driver .switchTo .activeElement)]
(.sendKeys editable "Your text here")))
;; Using the Taxi API the could should look something like this:
(switch-to-frame "#foo")
(switch-to-active)
(send-keys "Your text here")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment