Headless testing
- Phantomjs http://phantomjs.org/
- Casperjs http://casperjs.org/
- Zombie http://zombie.labnotes.org/
- Saucelabs https://saucelabs.com
- Browserling https://browserling.com/
Frameworks, Librerias y Herramientas
<script> | |
var message = JSON.stringify({ | |
view_url: '%%VIEW_URL_UNESC%%', | |
click_url: '%%CLICK_URL_UNESC%%', | |
cachebuster: '%%CACHEBUSTER%%', | |
glossy_id: '{{replace me with glossy id}}', | |
type: 'glossy', | |
pixels: [ | |
'{{replace me with pixel or delete me}}', | |
'{{replace me with pixel or delete me}}' |
function receiveMessage(e) { | |
var clickUrl; | |
if (typeof e.data === 'string' && e.data.indexOf('clickUrl') > -1) { | |
clickUrl = e.data.split('/')[1]; | |
var links = document.getElementsByTagName('a'); | |
[].forEach.call(links, function(link) { | |
link.href = link.href.replace('%%CLICK_URL_UNESC%%', clickUrl); | |
}); | |
} | |
} |
var glossyData = { | |
entryClass:GlossyEntry, | |
entry_kind : "phone-glossy", | |
entry_title : "Hyundai Glossy Ad", | |
entry_url : '', | |
click_url: "http://adclick.g.doubleclick.net/aclk?sa=L&ai=BKr-v9ivYUtOTO4vR0AHxyoDgC8664rwEAAAAEAEg5pHVHjgAWN64h4GNAWDJxqmLwKTYD7IBDTE5Mi4xNjguNi4xNzK6AQlnZnBfaW1hZ2XIAQnaASBodHRwOi8vMTkyLjE2OC42LjE3MjozMDAwL3Nvc2thL8ACAuACAOoCLC8xNTEyMzc5OC9PbnN3aXBlX1Rlc3RQdWIvZW5naW5lZXJpbmdhZGNsb25l-AL80R6AAwGQA6QDmAOkA6gDAeAEAaAGINgGAg&num=0&sig=AOD64_38afEWBj9eYWEkxbmd01KL16h-ZQ&client=ca-pub-6633971051468686&adurl=", | |
view_url: "http://pubads.g.doubleclick.net/pagead/adview?ai=BKr-v9ivYUtOTO4vR0AHxyoDgC8664rwEAAAAEAEg5pHVHjgAWN64h4GNAWDJxqmLwKTYD7IBDTE5Mi4xNjguNi4xNzK6AQlnZnBfaW1hZ2XIAQnaASBodHRwOi8vMTkyLjE2OC42LjE3MjozMDAwL3Nvc2thL8ACAuACAOoCLC8xNTEyMzc5OC9PbnN3aXBlX1Rlc3RQdWIvZW5naW5lZXJpbmdhZGNsb25l-AL80R6AAwGQA6QDmAOkA6gDAeAEAaAGINgGAg&sigh=-__Sf5O1IBg&adurl=" | |
}; |
Headless testing
Frameworks, Librerias y Herramientas
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;font-size:14px}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/php");</script> |
module.exports = (robot) -> | |
robot.brain.data.tell_messages ?= {} | |
localstorage = robot.brain.data.tell_messages | |
robot.respond /tell ([\w.-]*) (.*)/i, (msg) -> | |
datetime = new Date() | |
tellmessage = msg.match[1] + ": " + msg.message.user.name + " @ " + datetime.toTimeString() + " said: " + msg.match[2] + "\r\n" | |
if localstorage[msg.match[1]] == undefined | |
localstorage[msg.match[1]] = tellmessage | |
else | |
localstorage[msg.match[1]] += tellmessage |
OnswipePub.prototype.initQuantcastAnalytics = function() { | |
var ONSWIPE_QUANTCAST_ID = 'p-jFw9eQNm-jBph'; | |
var _qevents = _qevents || []; | |
// initialize quantcast vars | |
// if publisher has quantcast id build quantcast object with both theirs and our id | |
if (_reader.state.publisher.quantcast_id) { | |
_reader.state.analytics.quantcast_id = _reader.state.publisher.quantcast_id; | |
// if publisher has quantcast labels build a quantcast object with labels else not |
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>NYU - chat</title> | |
</head> | |
<body> | |
<h1>Express 3.0 + Socket.IO</h1> | |
<input id="button" type="button" value="Ping server"/> | |
<hr> |
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<style type="text/css"> | |
a { |
#!/bin/bash | |
# Open iPhone Simulator on default location for XCode 4.3 if found | |
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open iPhone Simulator on default location for XCode 4.2 if found | |
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app |