I am getting below error even though I had set the correct path for gecko driver.
Main:
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;
public class firstCase {
@Test
static void titleControl(){
System.setProperty("webdriver.gecko.driver", "D:\\Program Exe's\\geckodriver-v0.26.0-win64\\geckodriver.exe"); // Wee need that as Intellij doesn't know where it looks for browser
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
Assert.assertEquals(driver.getTitle(),"Google");
}
}
Error:
1594880236960 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\yasin\\AppData\\Local\\Temp\\rust_mozprofiledXH35Y"
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
1594880239039 Marionette INFO Listening on port 49419
1594880239073 Marionette WARN TLS certificate errors will be ignored for this session
Tem 16, 2020 9:17:19 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C