/^\s*\n/gm
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
// If your browser supports window.performance (at least Chrome does) use this: | |
window.performance.getEntries().forEach(function(resource) { console.log(resource.name); }); | |
// Other way: | |
// First 'Copy all as HAR' from Network panel. | |
// Expose result as 'window.HAR' | |
console.clear(); |
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 imagecount = 0; | |
var titleMissing = 0; | |
var altMissing = 0; | |
var $image = null; | |
jQuery('img').each(function(i, el) { | |
imagecount++; | |
$image = jQuery(el); | |
if(typeof $image.attr('title') !== 'undefined' && $image.attr('title') !== '') { |
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
# First Terminal | |
mkdir webdriverio-test && cd webdriverio-test | |
curl -O http://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.1.jar | |
java -jar selenium-server-standalone-2.43.1.jar | |
# Second Terminal (start from webdriverio-test directory) | |
npm install webdriverio | |
curl https://gist.githubusercontent.com/sand3r/29a431366d89442c5dfb/raw/c9d900abd30104e7d876bc2ee02dbee9b3a3c7c1/gistfile1.txt > test.js | |
node test.js |
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 webdriverio = require('webdriverio'); | |
var options = { | |
desiredCapabilities: { | |
browserName: 'firefox' | |
} | |
}; | |
webdriverio | |
.remote(options) | |
.init() | |
.url('http://www.google.com') |
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
(\S{5}) *([0-9]*-[0-9]*-20[0-9]* ([0-9]*:([0-9]*))) |