-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Webdriver actions to assist with testing a webpage which uses Angular.Js -- @package webdriver-angular @version 0.1.4 -- | This module exposes webdriver actions that can be used to -- interact with a page which uses AngularJs. This provides -- similar functionality as protractor and in fact we share some -- code with protractor. module Test.WebDriver.Commands.Angular -- | Wait until Angular has finished rendering before continuing. -- False indicates the timeout was hit (see -- setScriptTimeout) and we stopped waiting and True -- means that angular has finished rendering. waitForAngular :: (MonadIO wd, WebDriver wd) => Text -> wd Bool -- | Exceptions of this type will be thrown when an element is unable to be -- located. data NgException NgException :: String -> NgException data NgSelector -- | Argument is the binding, e.g. {{dog.name}} ByBinding :: Text -> NgSelector -- | Argument is the model name. Searches for elements with the -- ng-model="name" attribute. ByModel :: Text -> NgSelector -- | Argument is a model name. Searches for selected options within a -- select element matching the modelname. That is, the -- <option:checked> elements within a <select -- ng-model="name" ... >. BySelectedOption :: Text -> NgSelector -- | Find a single element from the document matching the given Angular -- selector. If zero or more than one element is returned, an exception -- of type NgException is thrown. findNg :: (MonadIO wd, WebDriver wd) => NgSelector -> wd Element -- | Find elements from the document matching the given Angular selector. findNgs :: WebDriver wd => NgSelector -> wd [Element] -- | Find a single element from within the given element which matches the -- given Angular selector. If zero or more than one element is returned, -- an exception of type NgException is thrown. findNgFrom :: (MonadIO wd, WebDriver wd) => Element -> NgSelector -> wd Element -- | Find elements from within the given element which match the given -- Angular selector. findNgsFrom :: WebDriver wd => Element -> NgSelector -> wd [Element] data NgRepeater -- | All the rows matching the repeater (e.g. 'dog in dogs') ByRows :: Text -> NgRepeater -- | A single row specified by the text of the repeater (e.g. 'dog in -- dogs') and the row index ByRow :: Text -> Int -> NgRepeater -- | A single column matching the text of the repeater (e.g. 'dog in dogs') -- and the column binding (e.g '{{dog.name}}'). ByColumn :: Text -> Text -> NgRepeater -- | A single row and column, given (repeater, row index, column binding). ByRowAndCol :: Text -> Int -> Text -> NgRepeater -- | Find an element from the document which matches the Angular repeater. -- If zero or more than one element are returned, an exception of type -- NgException is thrown. findRepeater :: (MonadIO wd, WebDriver wd) => NgRepeater -> wd Element -- | Find elements from the document which match the Angular repeater. findRepeaters :: WebDriver wd => NgRepeater -> wd [Element] -- | Find an element from the given element which matches the Angular -- repeater. If zero or more than one are returned, an exception of type -- NgException is thrown. findRepeaterFrom :: (MonadIO wd, WebDriver wd) => Element -> NgRepeater -> wd Element -- | Find elements from the given element which match the Angular repeater. findRepeatersFrom :: WebDriver wd => Element -> NgRepeater -> wd [Element] -- | Evaluate an angular expression, using the scope attached to the given -- element. ngEvaluate :: (WebDriver wd, FromJSON a) => Element -> Text -> wd a -- | Return the current absolute url according to Angular (using -- $location.absUrl()). getLocationAbsUrl :: WebDriver wd => Text -> wd Text -- | Browse to another page using in-page navigation (via -- $location.url). setNgLocation :: (MonadIO wd, WebDriver wd) => Text -> Text -> wd () instance Typeable NgException instance Show NgException instance Eq NgException instance Show NgSelector instance Eq NgSelector instance Show NgRepeater instance Eq NgRepeater instance Exception NgException