-2

I am getting the error "cannot execute binary file"

Used gecko driver 19.0, selenium 3.6, Firefox 56 Here is my program and output: enter image description here

enter image description here

imBollaveni
  • 99
  • 1
  • 13
Megha Gupta
  • 1
  • 1
  • 1
  • 2
    Possible duplicate of [Why Firefox requires GeckoDriver?](https://stackoverflow.com/questions/43660195/why-firefox-requires-geckodriver) – undetected Selenium Oct 05 '17 at 13:53
  • 2
    Please don't post error messages and code as images. They are text and should be posted as text. – waka Oct 05 '17 at 14:26

1 Answers1

1

You are directly passing geckodriver-v0.19.0-macos.tar.gz.

It's not a real file while it's a zip file which you need to extract the geckodriver first and then pass that file in code.

Just double-click on gz file and extract the file or use the command line as below:

gunzip -c geckodriver-v0.19.0-macos.tar.gz | tar xopf -
Shubham Jain
  • 16,610
  • 15
  • 78
  • 125