Getting this error while running my very first program

60 views
Skip to first unread message

Punk

unread,
Jun 25, 2018, 11:21:21 PM6/25/18
to Selenium Users
Please help me out guys
Screen Shot 2018-06-25 at 11.40.19 PM.png

Dev Perera

unread,
Jun 26, 2018, 2:00:15 AM6/26/18
to Selenium Users
Hello,

You have to give driver exe path before starting webdriver. In your case you have to give gecko driver path.
Ex;
System.setProperty("webdriver.gecko.driver", "D:\\MyFodlder\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();

On Tuesday, June 26, 2018 at 8:51:21 AM UTC+5:30, Punk wrote:
Please help me out guys

total QA

unread,
Jun 27, 2018, 1:09:03 AM6/27/18
to Selenium Users
Hi,

The error is due to the executable file is missing. But instead of storing this file in a particular location. Make sure copy this file in the Java Project itself. In this case we no need to provide the full path.

System.setProperty("webdriver.firefox.driver","geckodriver.exe");

thanks,
Reply all
Reply to author
Forward
0 new messages