{"_id":"soda-sync","_rev":"59-bf0ff5f7353bb1f3196d7374b0991a34","name":"soda-sync","description":"sync version of soda using fibers.","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"soda-sync","version":"0.0.1","description":"sync version of soda using fibers to write good looking test","keywords":["selenium","soda","test","fibers","sync"],"author":{"name":"Seb Vincent","email":"seb.vincent@gmail.com"},"repository":{"type":"git","url":"git@github.com:sebv/node-soda-sync.git"},"main":"./index","engine":"node >= 0.6.1","scripts":{"test":"cake test"},"dependencies":{"soda":"latest","make-sync":"latest"},"devDependencies":{"sv-cake-utils":"latest","should":"latest"},"_npmUser":{"name":"sebv","email":"seb.vincent@gmail.com"},"_id":"soda-sync@0.0.1","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"a5cd0916891ea06fd30c7ae3e3eae044646c93d6","tarball":"https://registry.npmjs.org/soda-sync/-/soda-sync-0.0.1.tgz","integrity":"sha512-SSo9ovcU5J+74m5guax4L9gRsZRwNvRV7Wa1wgWQcg0l1IjJWc++/BwgcCjATb093z1xjPofdbJHlCx+0LxkZg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB474Yo1b8a7vSTwrqGtVbhVRiUbuR84M+iz4ZNBbKBcAiEAghpfmf4lJPIkjgAqPuGUEm6YsgZ9D5dSK31PJtuhK6I="}]},"readme":"","maintainers":[{"name":"sebv","email":"seb.vincent@gmail.com"}],"directories":{}},"0.1.0":{"name":"soda-sync","version":"0.1.0","description":"sync version of soda using fibers.","keywords":["selenium","soda","test","fibers","sync"],"author":{"name":"Seb Vincent","email":"seb.vincent@gmail.com"},"repository":{"type":"git","url":"git@github.com:sebv/node-soda-sync.git"},"main":"./index","engine":"node >= 0.6.1","scripts":{"test":"cake test"},"dependencies":{"soda":"0.2.x","make-sync":"0.1.x"},"devDependencies":{"sv-cake-utils":"0.1.x","should":"0.6.x"},"_npmUser":{"name":"sebv","email":"seb.vincent@gmail.com"},"_id":"soda-sync@0.1.0","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"4672c617cda3a27df6cffd4a2aa46888ae1e771a","tarball":"https://registry.npmjs.org/soda-sync/-/soda-sync-0.1.0.tgz","integrity":"sha512-+sRwTdzCfRMFeghMgWDlVHjQXpaj7YdK9l5istae5LLMOwFiAhixxEAHjhKHN1EV9K80hBxZuaPKb+trmhNeNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdHdR+yCf3859yRH6yT3agJM3erTq1nVYC2cFuTU0degIhAP2Y9zWGMhI0PbsboE4kVV2AKzxlm3wEyqFVm3n1DRAg"}]},"readme":"","maintainers":[{"name":"sebv","email":"seb.vincent@gmail.com"}],"directories":{}},"0.1.1":{"name":"soda-sync","version":"0.1.1","description":"sync version of soda using fibers.","keywords":["selenium","soda","test","fibers","sync"],"author":{"name":"Seb Vincent","email":"seb.vincent@gmail.com"},"repository":{"type":"git","url":"git@github.com:sebv/node-soda-sync.git"},"main":"./index","engine":"node >= 0.6.1","scripts":{"test":"cake test"},"dependencies":{"soda":"0.2.x","make-sync":"0.1.x"},"devDependencies":{"sv-cake-utils":"0.1.x","should":"0.6.x"},"_npmUser":{"name":"sebv","email":"seb.vincent@gmail.com"},"_id":"soda-sync@0.1.1","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"86c1a6f187d8ea72de80a26a2a6a637c1aca7d21","tarball":"https://registry.npmjs.org/soda-sync/-/soda-sync-0.1.1.tgz","integrity":"sha512-SfBPwMLYVUWtrbeTWug933oOPvzw95hLvLO+5BjeZ0PPJN1hVq//axzNMsH/GsOsVcqqmZI6PnNV1YSuIbCBng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3tLbRlt2Z7lT5yWed4rXVW3aNPxbkF1w+4htNqGEDkQIhAMPpE5DEbZn3JDLZtqTgYPwrF8RUO1uONv7lxmLrcF08"}]},"readme":"","maintainers":[{"name":"sebv","email":"seb.vincent@gmail.com"}],"directories":{}},"0.1.2":{"name":"soda-sync","version":"0.1.2","description":"sync version of soda using fibers.","keywords":["selenium","soda","test","fibers","sync"],"author":{"name":"Seb Vincent","email":"seb.vincent@gmail.com"},"repository":{"type":"git","url":"git@github.com:sebv/node-soda-sync.git"},"main":"./index","engine":"node >= 0.6.1","scripts":{"test":"cake test"},"dependencies":{"soda":"0.2.x","make-sync":"0.1.x"},"devDependencies":{"coffee-script":"1.3.x","sv-cake-utils":"0.1.x","mocha":"1.0.x","should":"0.6.x"},"_npmUser":{"name":"sebv","email":"seb.vincent@gmail.com"},"_id":"soda-sync@0.1.2","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.16","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"632d5602da5a8508beba0d37fcd85dc3852d7652","tarball":"https://registry.npmjs.org/soda-sync/-/soda-sync-0.1.2.tgz","integrity":"sha512-SBeMnY5PlOIhtxgERl4xrYsxGM3W9eZqLRJ7+hvvPvSJzOtE0/JcfnGUFqVlfHYe/uDD19Yr4PMlQ5SGh5M+kA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDKGw3c9nMSIXcDak4ENHWrb+1DXjCf0JFlvF5CAW4H1AiAOjS1bGT2zXLHLoSOJiSwS2inzROUD5uywhWoSJUC/kw=="}]},"readme":"","maintainers":[{"name":"sebv","email":"seb.vincent@gmail.com"}],"directories":{}},"0.1.3":{"name":"soda-sync","version":"0.1.3","description":"sync version of soda using fibers.","keywords":["selenium","soda","test","fibers","sync"],"author":{"name":"Seb Vincent","email":"seb.vincent@gmail.com"},"repository":{"type":"git","url":"git@github.com:sebv/node-soda-sync.git"},"main":"./index","engine":"node >= 0.6.1","scripts":{"test":"cake test"},"dependencies":{"soda":"git://github.com/LearnBoost/soda.git","make-sync":"0.1.x"},"devDependencies":{"coffee-script":"1.3.x","sv-cake-utils":"0.1.x","mocha":"1.6.x","should":"1.2.x"},"readme":"# soda-sync\n\nA synchronous Version with a nice api of [soda](http://github.com/LearnBoost/soda.git), the node client for\n[Selenium](http://seleniumhq.org), built using [node-fibers](http://github.com/laverdet/node-fibers).\n\nRemote testing with [Sauce Labs](http://saucelabs.com) also works.\n\n## install\n\n```\nnpm install soda-sync\n```\n\n## usage (coffeescript)\n\nWhen calling createClient to get a new browser object,  add an extra 'mode' \nfield need to be passed in the options.\n\nAll the methods from [soda](http://github.com/LearnBoost/soda.git) / \n[Selenium](http://seleniumhq.org) are available. \n\n\nIn sync mode, the browser function must to be run within a Soda block. This \nblock holds the fiber environment. The Soda block context is set to the browser, \nso that the browser methods may be accessed using '@'.\n\n```coffeescript\n# Assumes that the selenium server is running\n\n{soda,Soda} = require 'soda-sync'\n\nbrowser = soda.createClient(\n  host: \"localhost\"\n  port: 4444\n  url: \"http://www.google.com\"\n  browser: \"firefox\"\n  mode: 'sync'\n)   \n\nSoda with:browser, ->\n  @session()\n  @open '/'\n  @type 'q', 'Hello World'\n  @click 'btnG'\n  @waitForElementPresent 'css=#topstuff' \n  title = @getTitle()\n  console.log \"Got title=\", title        \n  @testComplete()\n```\n## Sauce Labs example\n\nRemote testing with [Sauce Labs](http://saucelabs.com), works the same as with soda,\njust add the mode field to the options.\n\n```coffeescript\n{soda,Soda} = require 'soda-sync'\n\n# configure your sauce account here\nusername = '<USERNAME>'\naccess_key = '<ACCESS-KEY>'\n\nbrowser = soda.createSauceClient(\n  url: \"http://www.google.com\"\n  username: username\n  \"access-key\": access_key\n  os: \"Linux\"\n  browser: \"firefox\"\n  \"browser-version\": \"3.\"\n  \"max-duration\": 300\n  name: \"soda-sync sauce example\"\n  mode: 'sync'\n)\nbrowser.on 'command', (cmd, args) ->\n  console.log ' \\x1b[33m%s\\x1b[0m: %s', cmd, args.join(', ')   \n\nSoda with:browser, ->\n  @session()\n  @open '/'\n  @type 'q', 'Hello World'\n  @click 'btnG'\n  @waitForElementPresent 'css=#topstuff'\n  console.log @getTitle()\n  browser.setContext \"sauce:job-info={\\\"passed\\\": true}\"\n  @testComplete()\n  console.log  browser.jobUrl\n```\n\n\n## SodaCan\n\nSodaCan is a wrapper around Soda. It returns a function with a callback arguments, called last, \nafter other commands have been executed.\n\nThe example below is using the mocha test framework. The usual 'done' callback is managed within SodaCan.\n\nThe 'use' parameter is a function returning the browser evaluated each time the block is opened.\n\nA 'pre' method may also be specified. It is called before the Soda block starts, in the original \ncontext (In Mocha, it can be used to configure timeouts).\n\n```coffeescript\n# Assumes that the selenium server is running\n\nshould = require 'should'\n{soda,SodaCan} = require 'soda-sync'\n\ndescribe \"SodaCan\", ->\n  browser = null;\n  \n  it \"create client\", (done) ->\n    browser = soda.createClient (\n      host: \"localhost\"\n      port: 4444\n      url: \"http://www.google.com\"\n      browser: \"firefox\"\n      mode: 'sync'\n    )   \n    done()\n\n  describe \"with soda can, passing browser\", ->\n    it \"should work\", SodaCan \n      with: -> \n        browser\n      pre: -> \n        @timeout 30000\n    , -> \n      @session()\n      @open '/'\n      @getTitle().toLowerCase().should.include 'google'\n      @testComplete()\n```\n\n\n## a slightly leaner syntax\n\nWhen there is a browser parameter and no callback, Soda or SodaCan\nreturns a version of itself with a browser default added.\n\nSoda sample below:\n```coffeescript\n# Assumes that the selenium server is running\n\n{soda,Soda} = require 'soda-sync'\n\nbrowser = soda.createClient(\n  host: \"localhost\"\n  port: 4444\n  url: \"http://www.google.com\"\n  browser: \"firefox\"\n  mode: 'sync'\n)   \n\nSoda = Soda with:browser\n\nSoda -> \n  @session()\n  @open '/'\n  @testComplete()\n```\n\nSodaCan sample below, using the mocha test framework:\n```coffeescript\n# Assumes that the selenium server is running\n\nshould = require 'should'\n{soda,SodaCan} = require 'soda-sync'\n\ndescribe \"SodaCan\", ->\n  \n  browser = null;\n  SodaCan = SodaCan \n    with: \n      -> browser    \n    pre: \n      -> @timeout 30000    \n\n  it \"create client\", (done) ->\n    browser = soda.createClient\n      host: \"localhost\"\n      port: 4444\n      url: \"http://www.google.com\"\n      browser: \"firefox\"\n      mode: 'sync'\n    done()\n\n  describe \"with soda can, without passing browser\", ->\n    it \"should work\", SodaCan -> \n      @session()\n      @open '/'\n      @getTitle().toLowerCase().should.include 'google'\n      @testComplete()         \n```\n\n\n## to retrieve the browser currently in use\n\nThe current browser is automatically stored in the Fiber context.\nIt can be retrieved with the soda.current() function. \n\nThis is useful when writing test helpers.\n\n```coffeescript\n# Assumes that the selenium server is running\n\n{soda,Soda} = require 'soda-sync'\n\nbrowser = soda.createClient(\n  host: \"localhost\"\n  port: 4444\n  url: \"http://www.google.com\"\n  browser: \"firefox\"\n  mode: 'sync'\n)   \n\nopenRoot = ->\n  soda.current().open '/'\n\nSoda = Soda with:browser\n\nSoda -> \n  @session()\n  openRoot()  \n  @testComplete()\n```\n\n## modes\n\ncheck [make-sync](http://github.com/sebv/node-make-sync/blob/master/README.markdown#modes) for more details. \nProbably best to use the 'sync' mode.\n\n```coffeescript\nmode: 'sync'\nmode: 'async'\n\nmode: ['mixed']\nmode: ['mixed','args']\n\nmode: ['mixed','fibers']\n```\n\n\n## Selenium server\n\nDownload the Selenium server [here](http://seleniumhq.org/download/).\n\nTo start the server:\n\n```\njava -jar selenium-server.jar\n```\n\n\n## tested\n\nsoda\n*  createClient\n  \nbrowser\n*  session\n*  open\n*  type\n*  click\n*  waitForElementPresent\n*  getTitle\n*  testComplete\n","_id":"soda-sync@0.1.3","dist":{"shasum":"cab1d95a16ee05f655f1a222a68a56f32b165976","tarball":"https://registry.npmjs.org/soda-sync/-/soda-sync-0.1.3.tgz","integrity":"sha512-faxmnIykigembe6ermXgKQHOxh3EOMSMvOTh2lDKhWU9HCKJnDyCoAa8Y8TPF7YiecVtmJXZRq6lgk9fJSOU9A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCscHTAh3wZiDiYcfDVUaG4oD7cHSU6oTsIocEQNN+1HQIgHXM50X6WI315e2iuSE8FkCbFc2l46wof39W7FUXfn8w="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"sebv","email":"seb.vincent@gmail.com"},"maintainers":[{"name":"sebv","email":"seb.vincent@gmail.com"}],"directories":{}},"0.1.4":{"name":"soda-sync","version":"0.1.4","description":"sync version of soda using fibers.","keywords":["selenium","soda","test","fibers","sync"],"author":{"name":"Seb Vincent","email":"seb.vincent@gmail.com"},"repository":{"type":"git","url":"git@github.com:sebv/node-soda-sync.git"},"main":"./index","engine":"node >= 0.6.1","scripts":{"test":"cake test"},"dependencies":{"soda":"git://github.com/LearnBoost/soda.git","make-sync":"0.1.x"},"devDependencies":{"coffee-script":"1.3.x","sv-cake-utils":"0.1.x","mocha":"1.6.x","should":"1.2.x"},"readme":"# soda-sync\n\nA synchronous Version with a nice api of [soda](http://github.com/LearnBoost/soda.git), the node client for\n[Selenium](http://seleniumhq.org), built using [node-fibers](http://github.com/laverdet/node-fibers).\n\nRemote testing with [Sauce Labs](http://saucelabs.com) also works.\n\n## install\n\n```\nnpm install soda-sync\n```\n\n## usage (coffeescript)\n\nWhen calling createClient to get a new browser object,  add an extra 'mode' \nfield need to be passed in the options.\n\nAll the methods from [soda](http://github.com/LearnBoost/soda.git) / \n[Selenium](http://seleniumhq.org) are available. \n\n\nIn sync mode, the browser function must to be run within a Soda block. This \nblock holds the fiber environment. The Soda block context is set to the browser, \nso that the browser methods may be accessed using '@'.\n\n```coffeescript\n# Assumes that the selenium server is running\n\n{soda,Soda} = require 'soda-sync'\n\nbrowser = soda.createClient(\n  host: \"localhost\"\n  port: 4444\n  url: \"http://www.google.com\"\n  browser: \"firefox\"\n  mode: 'sync'\n)   \n\nSoda with:browser, ->\n  @session()\n  @open '/'\n  @type 'q', 'Hello World'\n  @click 'btnG'\n  @waitForElementPresent 'css=#topstuff' \n  title = @getTitle()\n  console.log \"Got title=\", title        \n  @testComplete()\n```\n## Sauce Labs example\n\nRemote testing with [Sauce Labs](http://saucelabs.com), works the same as with soda,\njust add the mode field to the options.\n\n```coffeescript\n{soda,Soda} = require 'soda-sync'\n\n# configure your sauce account here\nusername = '<USERNAME>'\naccess_key = '<ACCESS-KEY>'\n\nbrowser = soda.createSauceClient(\n  url: \"http://www.google.com\"\n  username: username\n  \"access-key\": access_key\n  os: \"Linux\"\n  browser: \"firefox\"\n  \"browser-version\": \"3.\"\n  \"max-duration\": 300\n  name: \"soda-sync sauce example\"\n  mode: 'sync'\n)\nbrowser.on 'command', (cmd, args) ->\n  console.log ' \\x1b[33m%s\\x1b[0m: %s', cmd, args.join(', ')   \n\nSoda with:browser, ->\n  @session()\n  @open '/'\n  @type 'q', 'Hello World'\n  @click 'btnG'\n  @waitForElementPresent 'css=#topstuff'\n  console.log @getTitle()\n  browser.setContext \"sauce:job-info={\\\"passed\\\": true}\"\n  @testComplete()\n  console.log  browser.jobUrl\n```\n\n\n## SodaCan\n\nSodaCan is a wrapper around Soda. It returns a function with a callback arguments, called last, \nafter other commands have been executed.\n\nThe example below is using the mocha test framework. The usual 'done' callback is managed within SodaCan.\n\nThe 'use' parameter is a function returning the browser evaluated each time the block is opened.\n\nA 'pre' method may also be specified. It is called before the Soda block starts, in the original \ncontext (In Mocha, it can be used to configure timeouts).\n\n```coffeescript\n# Assumes that the selenium server is running\n\nshould = require 'should'\n{soda,SodaCan} = require 'soda-sync'\n\ndescribe \"SodaCan\", ->\n  browser = null;\n  \n  it \"create client\", (done) ->\n    browser = soda.createClient (\n      host: \"localhost\"\n      port: 4444\n      url: \"http://www.google.com\"\n      browser: \"firefox\"\n      mode: 'sync'\n    )   \n    done()\n\n  describe \"with soda can, passing browser\", ->\n    it \"should work\", SodaCan \n      with: -> \n        browser\n      pre: -> \n        @timeout 30000\n    , -> \n      @session()\n      @open '/'\n      @getTitle().toLowerCase().should.include 'google'\n      @testComplete()\n```\n\n\n## a slightly leaner syntax\n\nWhen there is a browser parameter and no callback, Soda or SodaCan\nreturns a version of itself with a browser default added.\n\nSoda sample below:\n```coffeescript\n# Assumes that the selenium server is running\n\n{soda,Soda} = require 'soda-sync'\n\nbrowser = soda.createClient(\n  host: \"localhost\"\n  port: 4444\n  url: \"http://www.google.com\"\n  browser: \"firefox\"\n  mode: 'sync'\n)   \n\nSoda = Soda with:browser\n\nSoda -> \n  @session()\n  @open '/'\n  @testComplete()\n```\n\nSodaCan sample below, using the mocha test framework:\n```coffeescript\n# Assumes that the selenium server is running\n\nshould = require 'should'\n{soda,SodaCan} = require 'soda-sync'\n\ndescribe \"SodaCan\", ->\n  \n  browser = null;\n  SodaCan = SodaCan \n    with: \n      -> browser    \n    pre: \n      -> @timeout 30000    \n\n  it \"create client\", (done) ->\n    browser = soda.createClient\n      host: \"localhost\"\n      port: 4444\n      url: \"http://www.google.com\"\n      browser: \"firefox\"\n      mode: 'sync'\n    done()\n\n  describe \"with soda can, without passing browser\", ->\n    it \"should work\", SodaCan -> \n      @session()\n      @open '/'\n      @getTitle().toLowerCase().should.include 'google'\n      @testComplete()         \n```\n\n\n## to retrieve the browser currently in use\n\nThe current browser is automatically stored in the Fiber context.\nIt can be retrieved with the soda.current() function. \n\nThis is useful when writing test helpers.\n\n```coffeescript\n# Assumes that the selenium server is running\n\n{soda,Soda} = require 'soda-sync'\n\nbrowser = soda.createClient(\n  host: \"localhost\"\n  port: 4444\n  url: \"http://www.google.com\"\n  browser: \"firefox\"\n  mode: 'sync'\n)   \n\nopenRoot = ->\n  soda.current().open '/'\n\nSoda = Soda with:browser\n\nSoda -> \n  @session()\n  openRoot()  \n  @testComplete()\n```\n## alternate naming (JSLint Compliant)\n\n{soda,sync,can} = require 'soda-sync'\n\n- sync is the same as Soda\n- can is the same as SodaCan \n\n## modes\n\ncheck [make-sync](http://github.com/sebv/node-make-sync/blob/master/README.markdown#modes) for more details. \nProbably best to use the 'sync' mode.\n\n```coffeescript\nmode: 'sync'\nmode: 'async'\n\nmode: ['mixed']\nmode: ['mixed','args']\n\nmode: ['mixed','fibers']\n```\n\n\n## Selenium server\n\nDownload the Selenium server [here](http://seleniumhq.org/download/).\n\nTo start the server:\n\n```\njava -jar selenium-server.jar\n```\n\n\n## tested\n\nsoda\n*  createClient\n  \nbrowser\n*  session\n*  open\n*  type\n*  click\n*  waitForElementPresent\n*  getTitle\n*  testComplete\n","_id":"soda-sync@0.1.4","dist":{"shasum":"90fe5c7454c3c5851fc3988bfc7fb88fcca69cea","tarball":"https://registry.npmjs.org/soda-sync/-/soda-sync-0.1.4.tgz","integrity":"sha512-ngiAMBrw7x05BIky8HdEOqhql1YG253YYqU3ikBAHt019q4Rx0T7wVMZGxRgnMCVCbO0IR326VBLejQTz2c3AA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDn1l0cCVAfx1sOJAVflRE50EiCKt4ZAWZ8xGDr/UHfjAiASnNvkTBoOLxY2ayglj0mRJY6jQg0E9H+oVUGmkz8wWQ=="}]},"_npmVersion":"1.1.63","_npmUser":{"name":"sebv","email":"seb.vincent@gmail.com"},"maintainers":[{"name":"sebv","email":"seb.vincent@gmail.com"}],"directories":{}},"1.0.0":{"name":"soda-sync","version":"1.0.0","description":"sync version of soda using fibers.","keywords":["selenium","soda","test","fibers","sync"],"author":{"name":"Seb Vincent","email":"seb.vincent@gmail.com"},"repository":{"type":"git","url":"git@github.com:sebv/node-soda-sync.git"},"main":"./index","engine":"node >= 0.6.1","scripts":{"test":"cake test"},"dependencies":{"soda":"git://github.com/LearnBoost/soda.git","make-sync":"0.1.x"},"devDependencies":{"coffee-script":"1.3.x","sv-cake-utils":"0.1.x","mocha":"1.6.x","should":"1.2.x"},"readme":"# soda-sync\n\nNote: API change in version 1.0.0, see below.\n\nA synchronous version of [soda](http://github.com/LearnBoost/soda.git) \nusing [node-fibers](http://github.com/laverdet/node-fibers).\n\nRemote testing with [Sauce Labs](http://saucelabs.com) also works.\n\n## install\n\n```\nnpm install soda-sync\n```\n\n## usage (coffeescript)\n\n\n```coffeescript\n# Assumes that the selenium server is running\n\nsodaSync = require 'soda-sync'\n\n{browser,sync} = sodaSync.createClient(\n  host: \"localhost\"\n  port: 4444\n  url: \"http://www.google.com\"\n  browser: \"firefox\"\n)   \n\nsync ->\n  @session()\n  @open '/'\n  @type 'q', 'Hello World'\n  @click 'btnG'\n  @waitForElementPresent 'css=#topstuff' \n  title = @getTitle()\n  console.log \"Got title=\", title        \n  @testComplete()\n```\n\nAll the methods from [soda](http://github.com/LearnBoost/soda.git) / \n[Selenium](http://seleniumhq.org) are available. \n\nThe browser methods must be called within a sync block which holds the fiber environment. \nThe sync block context is set to the Soda browser so that the browser methods may be \naccessed using '@'.\n\n## upgrade to V1\n\nAPI was simplified below are the main changes:\n\n- 1/ require: `sodaSync = require 'soda-sync'`\n- 2/ createClient: `{browser,sync} = sodaSync.createClient(...`\n- 3/ Soda becomes sync\n- 4/ SodaCan becomes can (see can section below)\n- 5/ mode options have been disabled.\n\n## Sauce Labs example\n\nRemote testing with [Sauce Labs](http://saucelabs.com), works the same as with soda.\n\n```coffeescript\nsodaSync = require 'soda-sync'\n\n# configure your sauce account here\nusername = '<USERNAME>'\naccess_key = '<ACCESS-KEY>'\n\n{browser,sync} = sodaSync.createSauceClient(\n  url: \"http://www.google.com\"\n  username: username\n  \"access-key\": access_key\n  os: \"Linux\"\n  browser: \"firefox\"\n  \"browser-version\": \"3.\"\n  \"max-duration\": 300\n  name: \"soda-sync sauce example\"\n)\nbrowser.on 'command', (cmd, args) ->\n  console.log ' \\x1b[33m%s\\x1b[0m: %s', cmd, args.join(', ')   \n\nsync ->\n  @session()\n  @open '/'\n  @type 'q', 'Hello World'\n  @click 'btnG'\n  @waitForElementPresent 'css=#topstuff'\n  console.log @getTitle()\n  browser.setContext \"sauce:job-info={\\\"passed\\\": true}\"\n  @testComplete()\n  console.log  browser.jobUrl\n```\n\n## Soda can\n\ncan is a wrapper around Soda, making it easy to integrate with\ntest frameworks.\n\nThe example below is using the mocha test framework. The 'done' callback is managed within the Soda can.\n\nThe 'with' parameter is a function returning the browser evaluated each time the block is opened.\n\n'pre' methods may be specified globally or locally. They are called before the can block starts,\nwithout switching context (In Mocha, it can be used to configure timeouts).\n\n```coffeescript\n# Assumes that the selenium server is running\n\nshould = require 'should'\nsodaSync = require 'soda-sync'\n\ndescribe \"can\", ->\n  browser = null\n  can = sodaSync.can\n    with: -> browser\n    pre: -> @timeout 60000 # optional global pre\n\n  it \"create client\", (done) ->\n    {browser} = sodaSync.createClient (\n      host: \"localhost\"\n      port: 4444\n      url: \"http://www.google.com\"\n      browser: \"firefox\"\n    )   \n    done()\n\n  describe \"can without pre\", ->\n    it \"should work\", can ->\n      @session()\n      @open '/'\n      @getTitle().toLowerCase().should.include 'google'\n      @testComplete()\n\n  describe \"can with pre\", ->\n    it \"should work\", can \n      pre: -> \n        @timeout 30000 # local pre\n    , -> \n      @session()\n      @open '/'\n      @getTitle().toLowerCase().should.include 'google'\n      @testComplete()\n```\n\n## to retrieve the browser currently in use\n\nThe current browser is automatically stored in the Fiber context.\nIt can be retrieved with the soda.current() function. \n\nThis is useful when writing test helpers.\n\n```coffeescript\n# Assumes that the selenium server is running\n\nsodaSync = require 'soda-sync'\n\n{browser, sync} = sodaSync.createClient(\n  host: \"localhost\"\n  port: 4444\n  url: \"http://www.google.com\"\n  browser: \"firefox\"\n)   \n\nopenRoot = ->\n  sodaSync.current().open '/'\n\nsync -> \n  @session()\n  openRoot()  \n  @testComplete()\n```\n\n## JavaScript\n\nThis module is designed with CoffeeScript in mind, but you could\ninitialize browser and sync like in the following example, then use `browser` or `this` \ninstead of `@` in the sync/can blocks:\n\n```javascript\nvar sodaSync = require('soda-sync');\nvar client = sodaSync.createClient({\n    host: \"localhost\",\n    port: 4444,\n    url: \"http://www.google.com\",\n    browser: \"firefox\"\n  }),      \n  browser = client.browser,\n  sync = client.sync;\n```\n\n## Selenium server\n\nDownload the Selenium server [here](http://seleniumhq.org/download/).\n\nTo start the server:\n\n```\njava -jar selenium-server.jar\n```\n\n","_id":"soda-sync@1.0.0","dist":{"shasum":"1cf238334e59dad9f49376ecc2cfad7ec2defa78","tarball":"https://registry.npmjs.org/soda-sync/-/soda-sync-1.0.0.tgz","integrity":"sha512-JKzE9tgcEZz40uRNv7ui+plLQoLz1YjTOwcN7pBv+RBvu78gveEOG8gLziyl4m7ewjMGiKUMcTE0dDnzXNAt4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFmJ3eyqzJ+u40Gk3newFK24NzIr4HDJEf3KBDMAkla+AiEA5VlI1xXwECUBpMmj3xdNf20aacxaSa+3y0r1TlJkE+k="}]},"_npmVersion":"1.1.63","_npmUser":{"name":"sebv","email":"seb.vincent@gmail.com"},"maintainers":[{"name":"sebv","email":"seb.vincent@gmail.com"}],"directories":{}},"1.0.1":{"name":"soda-sync","version":"1.0.1","description":"sync version of soda using fibers.","keywords":["selenium","soda","test","fibers","sync"],"author":{"name":"Seb Vincent","email":"seb.vincent@gmail.com"},"repository":{"type":"git","url":"git@github.com:sebv/node-soda-sync.git"},"main":"./index","engine":"node >= 0.6.1","scripts":{"test":"cake test"},"dependencies":{"soda":"0.2.x","make-sync":"0.1.x"},"devDependencies":{"coffee-script":"latest","sv-cake-utils":"latest","mocha":"latest","should":"latest","sv-selenium":"latest"},"readme":"# node-soda-sync [![Build Status](https://secure.travis-ci.org/sebv/node-soda-sync.png?branch=master)](http://travis-ci.org/sebv/node-soda-sync)\n\nNote: API change in version 1.0.0, see below.\n\nA synchronous version of [soda](http://github.com/LearnBoost/soda.git) \nusing [node-fibers](http://github.com/laverdet/node-fibers).\n\nRemote testing with [Sauce Labs](http://saucelabs.com) also works.\n\n## install\n\n```\nnpm install soda-sync\n```\n\n## usage (coffeescript)\n\n\n```coffeescript\n# Assumes that the selenium server is running\n\nsodaSync = require 'soda-sync'\n\n{browser,sync} = sodaSync.createClient(\n  host: \"localhost\"\n  port: 4444\n  url: \"http://www.google.com\"\n  browser: \"firefox\"\n)   \n\nsync ->\n  @session()\n  @open '/'\n  @type 'q', 'Hello World'\n  @click 'btnG'\n  @waitForElementPresent 'css=#topstuff' \n  title = @getTitle()\n  console.log \"Got title=\", title        \n  @testComplete()\n```\n\nAll the methods from [soda](http://github.com/LearnBoost/soda.git) / \n[Selenium](http://seleniumhq.org) are available. \n\nThe browser methods must be called within a sync block which holds the fiber environment. \nThe sync block context is set to the Soda browser so that the browser methods may be \naccessed using '@'.\n\n## upgrade to V1\n\nAPI was simplified below are the main changes:\n\n- 1/ require: `sodaSync = require 'soda-sync'`\n- 2/ createClient: `{browser,sync} = sodaSync.createClient(...`\n- 3/ Soda becomes sync\n- 4/ SodaCan becomes can (see can section below)\n- 5/ mode options have been disabled.\n\n## Sauce Labs example\n\nRemote testing with [Sauce Labs](http://saucelabs.com), works the same as with soda.\n\n```coffeescript\nsodaSync = require 'soda-sync'\n\n# configure your sauce account here\nusername = '<USERNAME>'\naccess_key = '<ACCESS-KEY>'\n\n{browser,sync} = sodaSync.createSauceClient(\n  url: \"http://www.google.com\"\n  username: username\n  \"access-key\": access_key\n  os: \"Linux\"\n  browser: \"firefox\"\n  \"browser-version\": \"3.\"\n  \"max-duration\": 300\n  name: \"soda-sync sauce example\"\n)\nbrowser.on 'command', (cmd, args) ->\n  console.log ' \\x1b[33m%s\\x1b[0m: %s', cmd, args.join(', ')   \n\nsync ->\n  @session()\n  @open '/'\n  @type 'q', 'Hello World'\n  @click 'btnG'\n  @waitForElementPresent 'css=#topstuff'\n  console.log @getTitle()\n  browser.setContext \"sauce:job-info={\\\"passed\\\": true}\"\n  @testComplete()\n  console.log  browser.jobUrl\n```\n\n## Soda can\n\ncan is a wrapper around Soda, making it easy to integrate with\ntest frameworks.\n\nThe example below is using the mocha test framework. The 'done' callback is managed within the Soda can.\n\nThe 'with' parameter is a function returning the browser evaluated each time the block is opened.\n\n'pre' methods may be specified globally or locally. They are called before the can block starts,\nwithout switching context (In Mocha, it can be used to configure timeouts).\n\n```coffeescript\n# Assumes that the selenium server is running\n\nshould = require 'should'\nsodaSync = require 'soda-sync'\n\ndescribe \"can\", ->\n  browser = null\n  can = sodaSync.can\n    with: -> browser\n    pre: -> @timeout 60000 # optional global pre\n\n  it \"create client\", (done) ->\n    {browser} = sodaSync.createClient (\n      host: \"localhost\"\n      port: 4444\n      url: \"http://www.google.com\"\n      browser: \"firefox\"\n    )   \n    done()\n\n  describe \"can without pre\", ->\n    it \"should work\", can ->\n      @session()\n      @open '/'\n      @getTitle().toLowerCase().should.include 'google'\n      @testComplete()\n\n  describe \"can with pre\", ->\n    it \"should work\", can \n      pre: -> \n        @timeout 30000 # local pre\n    , -> \n      @session()\n      @open '/'\n      @getTitle().toLowerCase().should.include 'google'\n      @testComplete()\n```\n\n## to retrieve the browser currently in use\n\nThe current browser is automatically stored in the Fiber context.\nIt can be retrieved with the soda.current() function. \n\nThis is useful when writing test helpers.\n\n```coffeescript\n# Assumes that the selenium server is running\n\nsodaSync = require 'soda-sync'\n\n{browser, sync} = sodaSync.createClient(\n  host: \"localhost\"\n  port: 4444\n  url: \"http://www.google.com\"\n  browser: \"firefox\"\n)   \n\nopenRoot = ->\n  sodaSync.current().open '/'\n\nsync -> \n  @session()\n  openRoot()  \n  @testComplete()\n```\n\n## JavaScript\n\nThis module is designed with CoffeeScript in mind, but you could\ninitialize browser and sync like in the following example, then use `browser` or `this` \ninstead of `@` in the sync/can blocks:\n\n```javascript\nvar sodaSync = require('soda-sync');\nvar client = sodaSync.createClient({\n    host: \"localhost\",\n    port: 4444,\n    url: \"http://www.google.com\",\n    browser: \"firefox\"\n  }),      \n  browser = client.browser,\n  sync = client.sync;\n```\n\n## Selenium server\n\nDownload the Selenium server [here](http://seleniumhq.org/download/).\n\nTo start the server:\n\n```\njava -jar selenium-server.jar\n```\n\n","readmeFilename":"README.md","_id":"soda-sync@1.0.1","dist":{"shasum":"ffd7e0fae107483c001b7b99b5230326690059fe","tarball":"https://registry.npmjs.org/soda-sync/-/soda-sync-1.0.1.tgz","integrity":"sha512-iQzP2VxYbNybG2Dd+ew9KJdYkhjRUqfY8JNtEZytC5Mbr0ipAWHXWOBWg6o+LcQYr6wmwKHOhoBlTOc/qW9IBQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBWoj64sWhuYWhjNwUPQZ0MrbuIFOFYl+2D4Oo6FEituAiBaZsvdQyEXEKFeHanYv+rXctGYX4zIalYzqUAqw8Cu+A=="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"sebv","email":"seb.vincent@gmail.com"},"maintainers":[{"name":"sebv","email":"seb.vincent@gmail.com"}]}},"readme":"","maintainers":[{"name":"sebv","email":"seb.vincent@gmail.com"}],"time":{"modified":"2022-06-26T22:00:54.391Z","created":"2012-05-02T01:42:49.696Z","0.0.1":"2012-05-02T01:42:54.011Z","0.1.0":"2012-05-02T02:43:09.036Z","0.1.1":"2012-05-03T02:55:56.432Z","0.1.2":"2012-05-22T08:34:03.950Z","0.1.3":"2012-10-08T14:22:48.902Z","0.1.4":"2012-10-25T13:58:44.007Z","1.0.0":"2012-10-26T07:54:41.124Z","1.0.1":"2013-01-24T10:42:22.457Z"},"author":{"name":"Seb Vincent","email":"seb.vincent@gmail.com"},"repository":{"type":"git","url":"git@github.com:sebv/node-soda-sync.git"}}