Skip to content

Commit

Permalink
Commented patch. There are some items that merit discussion before me…
Browse files Browse the repository at this point in the history
…rging.

Updated Selenium API from 0.8.0 to 1.0.1. Fixed typo on storeSelectOptions.
Not sure the selenium action 'store' can be supported.
  • Loading branch information
dshaw committed Oct 12, 2010
1 parent d915946 commit 24e9662
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Expand Up @@ -196,7 +196,7 @@ Keep in mind you can extend the prototype as needed for your test. An example of

- Sauce Labs [Supported Browsers](http://saucelabs.com/products/docs/sauce-ondemand/browsers)
- Introduction to [Selenese](http://seleniumhq.org/docs/02_selenium_basics.html)
- Selenium [Command Reference](http://release.seleniumhq.org/selenium-core/0.8.0/reference.html).
- Selenium [Command Reference](http://release.seleniumhq.org/selenium-core/1.0.1/reference.html).


## License
Expand Down
77 changes: 67 additions & 10 deletions lib/soda/client.js
Expand Up @@ -251,51 +251,97 @@ exports.createClient = function(options){
*/

exports.commands = [
'addSelection'
, 'assertElementNotPresent'
// rc
'getNewBrowserSession'
, 'setContext'
, 'testComplete'
// selenium actions
, 'addLocationStrategy'
, 'addScript'
, 'addSelection'
, 'allowNativeXpath'
, 'altKeyDown'
, 'altKeyUp'
//, 'assertElementNotPresent' - should be an accessor
, 'answerOnNextPrompt'
, 'assignId'
, 'break'
, 'captureEntirePageScreenshot'
, 'check'
, 'chooseCancelOnNextConfirmation'
, 'chooseOkOnNextConfirmation'
, 'click'
, 'clickAt'
, 'clickAndWait'
, 'clickAt'
, 'clickAtAndWait'
, 'close'
, 'contextMenu'
, 'contextMenuAt'
, 'controlKeyDown'
, 'controlKeyUp'
, 'createCookie'
, 'deleteAllVisibleCookies'
, 'deleteCookie'
, 'deselectPopUp'
, 'doubleClick'
, 'doubleClickAt'
, 'dragAndDrop'
, 'dragAndDropToObject'
, 'echo'
, 'fireEvent'
, 'focus'
, 'goBack'
, 'getNewBrowserSession'
, 'highlight'
, 'ignoreAttributesWithoutValue'
, 'keyDown'
, 'keyPress'
, 'keyUp'
, 'metaKeyDown'
, 'metaKeyUp'
, 'mouseDown'
, 'mouseDownAt'
, 'mouseDownRight'
, 'mouseDownRightAt'
, 'mouseMove'
, 'mouseMoveAt'
, 'mouseOut'
, 'mouseOver'
, 'mouseUp'
, 'mouseUpAt'
, 'mouseUpRight'
, 'mouseUpRightAt'
, 'open'
, 'openWindow'
, 'pause'
, 'refresh'
, 'removeAllSelections'
, 'removeScript'
, 'removeSelection'
, 'rollup'
, 'runScript'
, 'select'
, 'selectFrame'
, 'selectPopUp'
, 'selectWindow'
, 'setContext'
, 'setBrowserLogLevel'
, 'setCursorPosition'
, 'setMouseSpeed'
, 'setSpeed'
, 'setTimeout'
, 'shiftKeyDown'
, 'shiftKeyUp'
, 'store' // NOTE: not sure this can be supported in Soda. Variables accessed with ${var}.
, 'submit'
, 'type'
, 'testComplete'
, 'typeKeys'
, 'uncheck'
, 'useXpathLibrary'
, 'waitForCondition'
, 'waitForFrameToLoad'
, 'waitForPageToLoad'
, 'waitForPopUp'
, 'windowFocus'
, 'windowMaximize'
, 'setSpeed'
];

/**
Expand All @@ -305,7 +351,9 @@ exports.commands = [
*/

exports.accessors = [
'Alert'
'ErrorOnNext'
, 'FailureOnNext'
, 'Alert'
, 'AllButtons'
, 'AllFields'
, 'AllLinks'
Expand All @@ -317,6 +365,7 @@ exports.accessors = [
, 'BodyText'
, 'Confirmation'
, 'Cookie'
, 'CookieByName'
, 'CursorPosition'
, 'ElementHeight'
, 'ElementIndex'
Expand All @@ -327,7 +376,8 @@ exports.accessors = [
, 'Expression'
, 'HtmlSource'
, 'Location'
, 'LogMessages'
, 'LogMessages' // Not in 1.0.1 docs
, 'MouseSpeed'
, 'Prompt'
, 'SelectedId'
, 'SelectedIds'
Expand All @@ -337,17 +387,22 @@ exports.accessors = [
, 'SelectedLabels'
, 'SelectedValue'
, 'SelectedValues'
, 'SelectedOptions'
, 'SelectOptions' // typo s/Selected/Select/
, 'Speed'
, 'Table'
, 'Text'
, 'Title'
, 'Value'
, 'WhetherThisFrameMatchFrameExpression'
, 'WhetherThisWindowMatchWindowExpression'
, 'XpathCount'
, 'AlertPresent'
, 'Checked'
, 'ConfirmationPresent'
, 'CookiePresent'
, 'Editable'
, 'ElementPresent'
, 'ElementNotPresent' // Selenium breaks naming convention FTL.
, 'Ordered'
, 'PromptPresent'
, 'SomethingSelected'
Expand All @@ -363,6 +418,7 @@ exports.accessors = [
* - get
* - assert
* - assertNot
* - store
* - verify
* - verifyNot
* - waitFor
Expand All @@ -382,6 +438,7 @@ exports.accessors.map(function(cmd){
'get' + cmd
, 'assert' + cmd
, 'assertNot' + cmd
, 'store' + cmd
, 'verify' + cmd
, 'verifyNot' + cmd
, 'waitFor' + cmd
Expand Down

0 comments on commit 24e9662

Please sign in to comment.