/* Steps to run this script: 1. Download "selenium-server-standalone-3.141.59.jar" from "https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar". 2. Run it with the command: "java -Dselenium.LOGGER.level=FINE -jar selenium-server-standalone-3.141.59.jar" 3. To install dependencies run "npm i selenium-webdriver". 4. To run the test run node reproduce_safari_crash.js NOTE: Crash happens soon after the button click happens. */ const webdriver = require('selenium-webdriver'); const { By } = require('selenium-webdriver'); const capabilities = { "browserName" : "safari", } async function runTestWithCaps () { let driver = new webdriver.Builder() .usingServer('http://localhost:6558/wd/hub') .withCapabilities(capabilities) .build(); await driver.get("https://3mocc-automation.ocsd.3m.com"); await driver.manage().window().maximize(); await driver.wait(webdriver.until.elementIsVisible(driver.findElement(By.xpath("//input[@id='Username']"), 10000))).sendKeys("drauto"); await driver.wait(webdriver.until.elementIsVisible(driver.findElement(By.xpath("//input[@id='Password']"), 10000))).sendKeys("P@ssword123!2"); await driver.wait(webdriver.until.elementIsVisible(driver.findElement(By.xpath("//button[@id='button-submit']"), 10000))).click(); await new Promise(resolve => setTimeout(resolve, 30000)); console.log(await driver.getTitle()); console.log(await driver.getTitle()); await driver.quit(); } runTestWithCaps();