michaelfox + test 40
How to I add a JQuery locators to Selenium Remote Control - Stack Overflow
october 2010 by michaelfox
Hi, I've been using XPath with Selenium quite happily and even using getEval with a but of Javascript, but a colleague said wouldn't it be great to be able to use JQuery selectors in Selenium.
I've googled it, but can't find any articles that seem to work for me. Could anyone provide a comprehensive guide on how to use JQuery syntax to extract doc elements and their respective values out of selenium.
I'm using C# to write my selenium tests, so if any examples could be from a C# perspective that'd be great.
Thanks
jquery
selenium
testing
browsers
ie
firefox
test
javascript
I've googled it, but can't find any articles that seem to work for me. Could anyone provide a comprehensive guide on how to use JQuery syntax to extract doc elements and their respective values out of selenium.
I'm using C# to write my selenium tests, so if any examples could be from a C# perspective that'd be great.
Thanks
october 2010 by michaelfox
gist: 601260 - GitHub
october 2010 by michaelfox
// This is the conclusion to my tests of determining the best way to cache images.
// I used apache access logs to determine when an image was actually requested from the web server.
// The following code, although not that elegant, works fine in IE6, IE7, IE8, FF3, Safari, Chrome, Opera
var _cacheImages = [];
function cacheImages(images){
$.each(images, function(index, val){
var image = new Image()
image.src = val;
_cacheImages.push( image );
});
};
// The following will NOT work in IE6:
function cacheImages(images){
$.each(images, function(index, val){
var image = new Image()
image.src = val;
});
};
// Also the following will NOT work in IE6 (sorry!)
function cacheImages(images){
$.each(images, function(index, val){
new Image().src = val;
});
};
// It seems you need to save a reference to the image object in order for IE6 to send a request to retrieve it
gist-601260
gist
javascript
cache
caching
performance
optimization
test
research
// I used apache access logs to determine when an image was actually requested from the web server.
// The following code, although not that elegant, works fine in IE6, IE7, IE8, FF3, Safari, Chrome, Opera
var _cacheImages = [];
function cacheImages(images){
$.each(images, function(index, val){
var image = new Image()
image.src = val;
_cacheImages.push( image );
});
};
// The following will NOT work in IE6:
function cacheImages(images){
$.each(images, function(index, val){
var image = new Image()
image.src = val;
});
};
// Also the following will NOT work in IE6 (sorry!)
function cacheImages(images){
$.each(images, function(index, val){
new Image().src = val;
});
};
// It seems you need to save a reference to the image object in order for IE6 to send a request to retrieve it
october 2010 by michaelfox
gist: 581815 - GitHub
october 2010 by michaelfox
// feature test for position fixed.
Modernizr.addTest('positionfixed', function () {
var test = document.createElement('div'),
control = test.cloneNode(false),
fake = false,
root = document.body || (function () {
fake = true;
return document.documentElement.appendChild(document.createElement('body'));
}());
var oldCssText = root.style.cssText;
root.style.cssText = 'padding:0;margin:0';
test.style.cssText = 'position:fixed;top:42px';
root.appendChild(test);
root.appendChild(control);
var ret = test.offsetTop !== control.offsetTop;
root.removeChild(test);
root.removeChild(control);
root.style.cssText = oldCssText;
if (fake) {
document.documentElement.removeChild(root);
}
return ret;
});
gist-581815
gist
javascript
modernizr
featuretest
test
css
positionfixed
Modernizr.addTest('positionfixed', function () {
var test = document.createElement('div'),
control = test.cloneNode(false),
fake = false,
root = document.body || (function () {
fake = true;
return document.documentElement.appendChild(document.createElement('body'));
}());
var oldCssText = root.style.cssText;
root.style.cssText = 'padding:0;margin:0';
test.style.cssText = 'position:fixed;top:42px';
root.appendChild(test);
root.appendChild(control);
var ret = test.offsetTop !== control.offsetTop;
root.removeChild(test);
root.removeChild(control);
root.style.cssText = oldCssText;
if (fake) {
document.documentElement.removeChild(root);
}
return ret;
});
october 2010 by michaelfox
Testing with fragmented sections - Website Optimizer Help
september 2010 by michaelfox
# Google Website Optimizer Support/Help
## Testing with fragmented sections
Fragmented sections allow you to control your experiments so that certain variations always appear together, delivering more consistent page variations. With fragmented sections, you can classify multiple elements on your page as part of the same section -- when a specific variation of one element shows, a specific variation of another element will show. The result is greater coordination within your page and the exclusion of combinations that you suspect will not work.
google
abtesting
split
test
testing
fragments
javascript
gwo
website
optimizer
splittesting
## Testing with fragmented sections
Fragmented sections allow you to control your experiments so that certain variations always appear together, delivering more consistent page variations. With fragmented sections, you can classify multiple elements on your page as part of the same section -- when a specific variation of one element shows, a specific variation of another element will show. The result is greater coordination within your page and the exclusion of combinations that you suspect will not work.
september 2010 by michaelfox
jamesyu's cohorts at master - GitHub
june 2010 by michaelfox
Cohorts is a simple, purely javascript, multivariate testing framework.
It allows you to easily run split tests for visitors on your site, showing them different designs, layouts, or whatever you want. Cohorts also allows you to track interesting events that occur for each of the cohorts. By default, it uses Google Analytics event tracking to store data, but you can customize it to use your own or another.
Note that Cohorts will not do any analysis for you: it’s up to you to carefully consider analyze the data gathered to make business decisions.
Since the framework is purely javascript based, it’s especially useful if you’re working in an environment that has page and fragment caching.
javascript
testing
multivariate
test
analytics
library
splittesting
It allows you to easily run split tests for visitors on your site, showing them different designs, layouts, or whatever you want. Cohorts also allows you to track interesting events that occur for each of the cohorts. By default, it uses Google Analytics event tracking to store data, but you can customize it to use your own or another.
Note that Cohorts will not do any analysis for you: it’s up to you to carefully consider analyze the data gathered to make business decisions.
Since the framework is purely javascript based, it’s especially useful if you’re working in an environment that has page and fragment caching.
june 2010 by michaelfox
Test (Sample) Data Generators
may 2010 by michaelfox
Sample / test data is an effective way to test web projects & applications. Other than meaningless data, real names, addresses, zip codes can make the whole testing stage easier.
WebResourcesDepot have collected some nice free test data generators which you may find useful:
data
database
design
development
generator
test
testing
sample
example
tools
webdev
WebResourcesDepot have collected some nice free test data generators which you may find useful:
may 2010 by michaelfox
pascaldevink's Patterns at master - GitHub
april 2010 by michaelfox
Full blown project sampling some design patterns, PHPUnit, Phing and Hudson
phpunit
phing
hudson
project
build
deployment
test
unittesting
continuousintegration
april 2010 by michaelfox
related tags
abtesting ⊕ acid ⊕ addons ⊕ agile ⊕ alpha ⊕ analysis ⊕ analytics ⊕ article ⊕ beginner ⊕ benchmark ⊕ bestpractices ⊕ beta ⊕ blank ⊕ browser ⊕ browsers ⊕ build ⊕ cache ⊕ caching ⊕ code ⊕ coding ⊕ cognitive ⊕ collection ⊕ compiler ⊕ content ⊕ continuousintegration ⊕ copy ⊕ css ⊕ data ⊕ database ⊕ datasets ⊕ debug ⊕ debugger ⊕ debugging ⊕ deployment ⊕ design ⊕ detection ⊕ development ⊕ download ⊕ email ⊕ epworth ⊕ example ⊕ extension ⊕ feature ⊕ featuretest ⊕ fiddle ⊕ fill ⊕ firebug ⊕ firefox ⊕ forms ⊕ fragments ⊕ free ⊕ generator ⊕ gist ⊕ gist-581815 ⊕ gist-601260 ⊕ google ⊕ gwo ⊕ hammerhead ⊕ health ⊕ html ⊕ hudson ⊕ ie ⊕ ipsum ⊕ javascript ⊕ jquery ⊕ library ⊕ lifelogging ⊕ list ⊕ lists ⊕ load ⊕ loadtime ⊕ lorem ⊕ markdown ⊕ marketing ⊕ microsoft ⊕ mind ⊕ mobile ⊕ mobileweb ⊕ modernizr ⊕ multivariate ⊕ mysql ⊕ newsletter ⊕ nightly ⊕ optimization ⊕ optimizer ⊕ patterns ⊕ performance ⊕ personalinformatics ⊕ phing ⊕ php ⊕ phpt ⊕ phpunit ⊕ placeholder ⊕ plugin ⊕ popular ⊕ positionfixed ⊕ programming ⊕ project ⊕ quantifiedself ⊕ rails ⊕ reference ⊕ research ⊕ resources ⊕ sample ⊕ selenium ⊕ self ⊕ seo ⊕ service ⊕ sleep ⊕ sniffing ⊕ source ⊕ space ⊕ spam ⊕ speed ⊕ split ⊕ splittesting ⊕ sql ⊕ standard ⊕ statistics ⊕ tdd ⊕ test ⊖ testdata ⊕ testing ⊕ text ⊕ tools ⊕ tracking ⊕ unit ⊕ unittest ⊕ unittesting ⊕ useragent ⊕ utilities ⊕ validation ⊕ web ⊕ webdesign ⊕ webdev ⊕ website ⊕ webtool ⊕ yslow ⊕Copy this bookmark: