0

i'm getting this error when i am trying to run my first script.Can anyone please help me

enter image description here

  • 1
    Please edit this post and paste in the full error. What show in the screenshot is not enough for anyone to help you. – Kate Paulk Jul 17 '18 at 11:45
  • oh okay......... – Albin K S Jul 17 '18 at 12:00
2

Give the gecko driver path before creating the object for the driver. Use

System.setProperty("webdriver.gecko.driver", "path to your gecko driver");

to declare the driver path.

  • yeah.. after setting the gecko driver path, it runs successfully..but as per the tutorial i also tried to set the environment variable in system properties..but that didn't worked – Albin K S Jul 18 '18 at 10:27
1

The code you have written might have worked if you would have used Firefox version lesser than 48 and webdriver 3. At that time firefox driver was implemented as a xpi based plugin; that was the reason why it was different from IE and Chrome where you explicitly needed to set the system property.

In short if you want to fix the issue, please add the below code to your class.

System.setProperty("webdriver.gecko.driver", "path to your gecko driver");
0

Unable to see error message properly, my guess is you didn't set gecko driver path in environment variables maybe

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.