0

written a code like this

FirefoxProfile profile=new FirefoxProfile();
profile.setAcceptUntrustedCertificates(true);
WebDriver driver=new FirefoxDriver();
driver.get("url");

Not working in firefox how to resolve this one.

Alexey Ivanov
  • 11,541
  • 4
  • 39
  • 68
mahesh
  • 51
  • 1
  • 1
  • 6

2 Answers2

0

You're not creating the driver with the profile - you're creating it with an empty constructor. Try WebDriver driver=new FirefoxDriver(profile);

Neil B.
  • 86
  • 3
0

You can use Selenium WebDriverJS

var WebDriver = require('selenium-webdriver');
var driver = new WebDriver.Builder().withCapabilities(
    WebDriver.Capabilities.firefox()
).build();

driver.get('url');
Med.J
  • 71
  • 1
  • 1
  • 10