This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Module dependencies. | |
*/ | |
var express = require('express'), async = require('async'), http = require('http'), path = require('path'), sys = require('util'), | |
rest = require('restler'); | |
var app = express(); | |
// all environments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var renderResponse = dojo.partial(dojo.hitch(this, function(obj, data) { | |
this._processResponse(data, obj); | |
}), obj); | |
var renderErrorResponse = dojo.partial(dojo.hitch(this, function(obj, data) { | |
this._processErrorResponse(data, obj); | |
}), obj); | |
dojo.xhrGet(args).then(renderResponse, renderErrorResponse); | |
_processResponse : function (data, obj) { ... } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// All items | |
List<WebElement> elements = driver | |
.findElements(By | |
.xpath("//li[contains(@id,'xxxFilteringSelect_') and contains(@id,'_popup') " | |
+ " and not(contains(@class,'dijitMenuPreviousButton'))" | |
+ " and not(contains(@class,'dijitMenuNextButton'))]")); | |
// Get map of all dojo popupId to name | |
for (WebElement element : elements) { | |
String id = element.getAttribute("id"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Selenium selenium = new WebDriverBackedSelenium(driver,driver.getCurrentUrl()); | |
selenium.mouseDown("xxxFilteringSelect"); | |
selenium.mouseOver(popupId); | |
selenium.mouseUp(popupId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beforeEach(function() { | |
this.addMatchers({ | |
toBeDate: function(expected) { | |
return (new Date(expected) instanceof Date); | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var standby = new dojox.widget.Standby({target: id}); | |
document.body.appendChild(standby.domNode); | |
standby.startup(); | |
standby.show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clazz = "dojo class name"; | |
dojo["require"](clazz); | |
var ctor = dojo.getObject(clazz); | |
var widget = new ctor(artts); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CVS data | |
var bytes =[] | |
//populate bytes... | |
var data = dojox.encoding.base64.encode(bytes); | |
// export | |
var filename = filename + "_" + dojo.date.locale.format(new Date(), | |
{datePattern: "MM_dd_yyyy",timePattern: "HH_mm_ss"}); | |
dojo.byId("exportbutton").href='data:application/vnd.ms-excel;base64,' +data; | |
dojo.byId("exportbutton").download= filename + ".csv"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CVS data | |
var bytes =[] | |
//populate bytes... | |
var data = dojox.encoding.base64.encode(bytes); | |
// export | |
var filename = filename + "_" + dojo.date.locale.format(new Date(), | |
{datePattern: "MM_dd_yyyy",timePattern: "HH_mm_ss"}); | |
dojo.byId("exportbutton").href='data:application/vnd.ms-excel;base64,' +data; | |
dojo.byId("exportbutton").download= filename + ".csv"; |