farnking / Test-Dragon-Forum-of-TBots

a fuzzer lab
1 stars 1 forks source link

Test-Dragon crashed when launching webdriver for firefox #20

Open farnking opened 11 months ago

farnking commented 11 months ago

Describe the bug Crash at launching geckodriver while testing a web app via firefox browser.

Project ID https://web.ee.ntu.edu.tw/ via firefox

Name of App under Test https://web.ee.ntu.edu.tw/

Type of App under Test web

URL https://web.ee.ntu.edu.tw/

To Reproduce Steps to reproduce the behavior:

  1. After logging in, select project of web type with url: https://web.ee.ntu.edu.tw/ and browser firefox.
  2. Crash with error message:

    Exception has occurred: SessionNotCreatedException
    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
    File "C:\Users\farn\OneDrive\文件\realtime\prgm\TestDragon\Client\TDPlaygroundClient\src\CnUtil.py", line 1280, in __init__
    desired_capabilities = desired_capabilities

Expected behavior After selecting any project, Test-Dragon should smoothly run into analyzing stage of the DOM and the screenshot.

Screenshots image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Call stack of running procedures (or methods)

    Exception has occurred: SessionNotCreatedException
    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
      File "C:\Users\farn\OneDrive\文件\realtime\prgm\TestDragon\Client\TDPlaygroundClient\src\CnUtil.py", line 1280, in __init__
        desired_capabilities = desired_capabilities
      File "C:\Users\farn\OneDrive\文件\realtime\prgm\TestDragon\Client\TDPlaygroundClient\src\CnUtil.py", line 3195, in webDriverManagerFromForum
        downloadDir
      File "C:\Users\farn\OneDrive\文件\realtime\prgm\TestDragon\Client\TDPlaygroundClient\src\DuT\CnMWeb\tMWebDefault.py", line 3173, in start
        downloadDir
      File "C:\Users\farn\OneDrive\文件\realtime\prgm\TestDragon\Client\TDPlaygroundClient\src\DuT\CnMWeb\tMWebDefault.py", line 3112, in __init__
        self.driver, self.processId = self.start()
      File "C:\Users\farn\OneDrive\文件\realtime\prgm\TestDragon\Client\TDPlaygroundClient\src\CnStateMachine.py", line 3750, in __init__
        self.__device = tMWebDefault.testingModuleWeb(self.__TD)
      File "C:\Users\farn\OneDrive\文件\realtime\prgm\TestDragon\Client\TDPlaygroundClient\src\CnProjectManager.py", line 222, in __init__
        mainStateMac = CnStateMachine.CnStateMachine(self.__TD)
      File "C:\Users\farn\OneDrive\文件\realtime\prgm\TestDragon\Client\TDPlaygroundClient\src\CnTBotManager.py", line 180, in startMegaTBot
        self.proj = CnProjectManager.CnProject(self.__TD, self.curAppId, self.curProjectId, self.curProjectDict)
    selenium.common.exceptions.SessionNotCreatedException: 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

Dumping text from terminal or console not applicable

Additional context not applicable

Your diagnosis Selenium seems cannot find where geckodriver is.

Your suggestions for fixing the problem If any? That could be most valuable.

References Please check https://www.browserstack.com/guide/geckodriver-selenium-python https://stackoverflow.com/questions/65318382/expected-browser-binary-location-but-unable-to-find-binary-in-default-location https://stackoverflow.com/questions/73709258/selenium-no-mozfirefoxoptions-binary-capability-provided-and-no-binary-flag

farnking commented 11 months ago

maybe it was because the firefox browser has not been installed. Please check https://www.mozilla.org/zh-TW/firefox/new/