Beginner learning Selenium WebDriver and here is my first attempt (in the pastebin link): https://pastebin.com/TC718eKi

OS: Ubuntu 23.04

IDE: intelliJ

Browser: FireFox

Dependencies: Selenium-Java (4.10.0)/ Selenium-API (4.10.0)/ TestNG (7.8.0)/ webdrivermanager (5.4.0)

But test failed with the following Error Message:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Expected browser binary location, but unable to find binary in default location, no ‘moz:firefoxOptions.binary’ capability provided, and no binary flag set on the command line

  • shiroininja@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    You need to install the Firefox-driver. That’s what selenium uses to control the browser. You either download it or get it from Apt.

    • LemmyStartNow@programming.devOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 year ago

      Is there more to the process? I downloaded firefox from both the webpage and through CLI and have them both moved to the ~/.local/bin directory(PATH) but still the error message appears to fail the test