Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

289
Views
Unable to get Selenium webdriver to stop closing safari browser

Having issues getting safari to not close the browser upon completion of the code below. Chrome and Firefox stay up, but safari closes the second it finishes. I am using Webdriver, and writing with javascript.

    let driver = await new Builder().forBrowser("safari").build();
    await driver.get("http://website.com");
    await driver.findElement(By.name("os_username")).sendKeys("username");
    await driver.findElement(By.name("os_password")).sendKeys("password");
    await driver.findElement(By.name("login")).sendKeys(Key.RETURN);

    // input search bar data, and click return.
    await driver.sleep(5000);
    await driver.findElement(By.name("searchString")).sendKeys("Name");
    await driver.findElement(By.name("searchString")).sendKeys(Key.RETURN);
    await driver.sleep(10000);
}
safariLogin(); ```
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can just prevent the script from ending using a breakpoint at the end.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!