Created
December 2, 2016 14:39
-
-
Save lenny/9b493d686116bcbd17d46b446e6fd4c4 to your computer and use it in GitHub Desktop.
Modified version of James' script that bombs out with error when bug is detected
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
/* selenium webdriver safari 10 OSX Sierra testing | |
[Error] Failed to load resource: The network connection was lost. | |
Note: Script is unable to capture console log errors. Error occurs | |
when page is blank | |
Error occurs for the following urls | |
https://authors.aps.org/Submissions | |
https://authors.staging.aps.org/Submissions | |
========================================================================================== | |
Running script: | |
Install node js v7.2.0 | |
run cmd: node safari.js <url> | |
*/ | |
var webdriver = require('selenium-webdriver'), | |
logging = webdriver.logging, | |
By = webdriver.By, | |
url = process.argv[2]; | |
logging.installConsoleHandler(); | |
logging.getLogger('webdriver.http').setLevel(logging.Level.WARN); | |
var driver = new webdriver.Builder().forBrowser( 'safari' ).build(); | |
driver.get(url); | |
for(let i = 0; i < 10; i++) { | |
driver.navigate().refresh(); | |
driver.findElement(By.name('username')); | |
} | |
driver.quit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment