Skip to content

Instantly share code, notes, and snippets.

#include "stdafx.h"
#include <windows.h>
#include "webdriver.h"
#pragma comment (lib, "InternetExplorerDriver.lib")
#define CALL(func, error) \
if (func != SUCCESS) { \
fprintf(stderr, "error: %s\n", error); \
if (NULL != wd) { \
wdFreeDriver(wd); \
(import '[com.thoughtworks.selenium DefaultSelenium])
(defn- run-with-client
"Run a test function with new client"
[test-fn opts]
(let [client (new DefaultSelenium (:host opts) (:port opts) (:command opts)
(:url opts))]
(.start client)
(try
(test-fn client)
>>> import saucerc.controller.server as s
>>> s.get_last_version ()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/home/miki/<ipython console> in <module>()
/home/miki/work/sauce-rc-private/sauce-rc-windows/saucerc/controller/server.py in get_last_version()
90 def get_last_version():
#!/usr/bin/env python
import selenium, json
def main(argv=None):
import sys
from optparse import OptionParser
argv = argv or sys.argv
(env)(master) [15:49] humongous $lein deps
[INFO] snapshot org.buntin:compojure:0.4.0-SNAPSHOT: checking for updates from central
[INFO] snapshot org.buntin:compojure:0.4.0-SNAPSHOT: checking for updates from clojure
[INFO] snapshot org.buntin:compojure:0.4.0-SNAPSHOT: checking for updates from clojure-snapshots
[INFO] snapshot org.buntin:compojure:0.4.0-SNAPSHOT: checking for updates from clojars
Downloading: org/buntin/compojure/0.4.0-SNAPSHOT/compojure-0.4.0-20100215.165114-1.pom from clojars
Transferring 2K from clojars
Downloading: clout/clout/0.1/clout-0.1.pom from clojure
Downloading: clout/clout/0.1/clout-0.1.pom from clojure-snapshots
Downloading: clout/clout/0.1/clout-0.1.pom from clojars
>>> sel.get_text("css=.spec.failed")
u"should show more bet activities when click on the more button for pagination: https://saucelabs.com/jobs/f00def4823cd53312bc71f9d11eba0ac execution expired\n /mnt/buildslave-work/trunk-ie6/build/frontend/vendor/gems/selenium-client-1.2.16/lib/selenium/client/protocol.rb:19:in `string_command'\n/mnt/buildslave-work/trunk-ie6/build/frontend/vendor/gems/selenium-client-1.2.16/lib/selenium/client/protocol.rb:56:in `boolean_command'\n/mnt/buildslave-work/trunk-ie6/build/frontend/vendor/gems/selenium-client-1.2.16/lib/selenium/client/generated_driver.rb:1088:in `is_element_present'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:260:in `assert_no_server_errors'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:248:in `assert_no_errors'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:183:in `wait_for_load'\n/mnt/buildslave-work/trunk-ie6/build/frontend/spec/spec_lib/selenium/page.rb:233:
.
|-- Makefile
|-- README.rst
|-- LICENSE.txt
|-- build-cxfreeze
|-- clean.py
|-- cxfreeze_setup.py
|-- docs
| |-- images
| | |-- SauceRC_config.png
class Validated:
__fields__ = {} # field -> validator list
def validate(self):
errors = []
for field, validators in self.__fields__.iteritems():
if not hasattr(self, field):
errors.append("field %s missing" % field)
continue
field_errors = []
class ValidatorException(Exception): pass
class Validated:
__fields__ = {} # field -> validator list
def validate(self):
errors = []
for field, validators in self.__fields__.iteritems():
if not hasattr(self, field):
errors.append("field %s missing" % field)
curl -X PUT localhost:5984/chefs/_revs_limit -d '10'
{"error":"{{badmatch,{error,enospc}},\n [{couch_db_updater,commit_data,2},\n {couch_db_updater,handle_call,3},\n {gen_server,handle_msg,5},\n {proc_lib,init_p_do_apply,3}]}","reason":"{gen_server,call,[<0.25490.10>,{set_revs_limit,10},infinity]}"}