This file contains hidden or 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
//thanks to rick maisano | |
var ignoreNodes = new Set(['INPUT', 'TEXTAREA']); | |
function walk(node) { | |
if (ignoreNodes.has(node.tagName)) { | |
return; | |
} | |
switch (node.nodeType) { | |
// Element | |
case 1: | |
// Document |
This file contains hidden or 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 ignoreNodes = new Set(['INPUT', 'TEXTAREA']); | |
function walk(node) { | |
if (ignoreNodes.has(node.tagName)) { | |
return; | |
} | |
switch (node.nodeType) { | |
// Element | |
case 1: | |
// Document | |
case 9: |
This file contains hidden or 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
/** | |
* Call this if you need to modify the service before building it, such as | |
* Builder b = PhantomJsDriverService.createDefaultServiceBuilder(null); | |
* b.withLogFile(new File("foo.log")); | |
* b.build(); | |
**/ | |
public static Builder createDefaultServiceBuilder(Capabilities desiredCapabilities){ | |
// Look for Proxy configuration within the Capabilities | |
Proxy proxy = null; | |
if (desiredCapabilities != null) { |