- Use page objects
- avoid protocol methods and prefer commands
- don't use timeouts unless you have a good reason
- use waitFor, waitForVisible etc
- avoid caching elements
- avoid arbitrary pause() calls
- use mocks
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
(function() { | |
var codeBlocks = document.getElementsByTagName('pre'), | |
codeLines = 0, | |
body = document.getElementsByTagName('body')[0], | |
text = function(el) { | |
if (el.innerText) return el.innerText; | |
return el.textContent; | |
}; | |
var trimEmptyLines = function (lines) { |