Skip to content

Commit

Permalink
update sendKeys documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
erratic-pattern committed Sep 30, 2016
1 parent 81d5915 commit 9fca3d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Test/WebDriver/Commands.hs
Expand Up @@ -216,7 +216,7 @@ Consider the following example:
Because the result of the 'executeJS' is discarded, GHC cannot resolve
which instance of the 'fromJSON' class to use when parsing the
Selenium server response. In such cases, we can use the 'ignoreReturn'
helper function located in `Test.WebDriver.JSON`. 'ignoreReturn' has
helper function located in "Test.WebDriver.JSON". 'ignoreReturn' has
no runtime effect; it simply helps the type system by expicitly providing
a `fromJSON` instance to use.
Expand Down Expand Up @@ -477,8 +477,8 @@ getText :: WebDriver wd => Element -> wd Text
getText e = doElemCommand methodGet e "/text" Null

-- |Send a sequence of keystrokes to an element. All modifier keys are released
-- at the end of the function. For more information about modifier keys, see
-- <https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidvalue>
-- at the end of the function. Named constants for special modifier keys can be found
-- in "Test.WebDriver.Common.Keys"
sendKeys :: WebDriver wd => Text -> Element -> wd ()
sendKeys t e = noReturn . doElemCommand methodPost e "/value" . single "value" $ [t]

Expand Down
4 changes: 3 additions & 1 deletion src/Test/WebDriver/Common/Keys.hs
@@ -1,5 +1,7 @@
{-# LANGUAGE OverloadedStrings #-}

-- |This module contains named constants corresponding to the special characters recognized by 'sendKeys'.
-- For more details on these special characters, consult the Selenium documentation at
-- <https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidvalue>
module Test.WebDriver.Common.Keys where

import Data.Text (Text)
Expand Down

0 comments on commit 9fca3d7

Please sign in to comment.