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
<!DOCTYPE html> | |
<style> | |
html { background: silver; } | |
body { background: blue; } | |
div { background: red; } | |
</style> | |
<body> | |
<div style="width=100px;">Hello!</div> | |
</body> |
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
driver.get("https://www.betxchange.co.za/"); | |
driver.wait(function() { | |
return driver.isElementPresent({id: "enterHyperLink"}).then(function(present) { | |
if (!present) return false; | |
return driver.findElement({id: "enterHyperLink"}).isDisplayed(); | |
}); | |
}, 5000).then(function() { | |
console.log('found it'); | |
}, function(err) { | |
console.log(err.stack); |
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 webdriver = require('selenium-webdriver'); | |
var results = []; | |
for (var i = 0; i < 3; ++i) { | |
results.push(webdriver.promise.createFlow(function() { | |
var driver = new webdriver.Builder(). | |
withCapabilities(webdriver.Capabilities.chrome()). | |
build(); | |
driver.get('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
interface NetworkConnection { | |
Type getConnection(); | |
void setConnection(Type type); | |
enum Type { | |
WIFI, | |
CELLULAR, | |
NONE | |
} | |
} |
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
T 2014-04-03 16:18:18:935 IECommandExecutor.cpp(162) Entering IECommandExecutor::OnExecCommand | |
T 2014-04-03 16:18:18:935 IECommandExecutor.cpp(453) Entering IECommandExecutor::DispatchCommand | |
T 2014-04-03 16:18:18:935 IECommandExecutor.cpp(569) Entering IECommandExecutor::GetCurrentBrowser | |
T 2014-04-03 16:18:18:935 IECommandExecutor.cpp(575) Entering IECommandExecutor::GetManagedBrowser | |
T 2014-04-03 16:18:18:935 IECommandExecutor.cpp(525) Entering IECommandExecutor::IsAlertActive | |
T 2014-04-03 16:18:18:935 Browser.cpp(631) Entering Browser::GetActiveDialogWindowHandle | |
T 2014-04-03 16:18:18:935 Browser.cpp(175) Entering Browser::GetWindowHandle | |
D 2014-04-03 16:18:18:935 IECommandExecutor.cpp(539) No alert handle is found | |
T 2014-04-03 16:18:18:935 IECommandExecutor.cpp(569) Entering IECommandExecutor::GetCurrentBrowser | |
T 2014-04-03 16:18:18:935 IECommandExecutor.cpp(575) Entering IECommandExecutor::GetManagedBrowser |
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
// class FirefoxOptions extends Options {}; | |
FirefoxOptions options = new FirefoxOptions(); | |
options.setEnableNativeEvents(true); | |
options.setProxy(proxy); | |
options.setProfile(new FirefoxProfile()); | |
options.set("customKey", "customValue"); | |
WebDriver driver = new FirefoxDriver(options); |
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
bot.inject.recompileFunction_ = function(fn, theWindow) { | |
if (goog.isString(fn)) { | |
try { | |
return new theWindow['Function'](fn); | |
} catch (ex) { | |
// Try to recover if in IE-quirks. | |
if (theWindow.execScript) { | |
theWindow.execScript('var __$$webdriver_fn$$__ = (function(){' + fn + '\n})'); | |
return theWindow['__$$webdriver_fn$$__']; | |
} |
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
log4j:ERROR setFile(null,false) call failed. | |
java.io.FileNotFoundException: log.txt (Permission denied) | |
at java.io.FileOutputStream.open(Native Method) | |
at java.io.FileOutputStream.<init>(FileOutputStream.java:212) | |
at java.io.FileOutputStream.<init>(FileOutputStream.java:136) | |
at org.apache.log4j.FileAppender.setFile(FileAppender.java:290) | |
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164) | |
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257) | |
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133) | |
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:97) |
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
goog.require('goog.debug.DivConsole'); | |
goog.require('goog.debug.LogManager'); | |
goog.require('goog.log'); | |
var div = document.createElement('div'); | |
document.body.appendChild(div); | |
var divConsole = new goog.debug.DivConsole(div); | |
divConsole.setCapturing(true); |
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
webdriver.atoms.inject.dom.getText = function(element, opt_window) { | |
var response; | |
try { | |
var targetWindow = webdriver.atoms.inject.getWindow(opt_window); | |
var domEl = /** @type {!Element} */ (bot.inject.cache.getElement( | |
element[bot.inject.ELEMENT_KEY], targetWindow.document)); | |
var text = bot.dom.getVisibleText(domEl); | |
response = bot.inject.wrapResponse(text); | |
} catch (ex) { | |
response = bot.inject.wrapError(ex); |
NewerOlder