1

Is the method startProfile(FirefoxProfile, File, String) in FirefoxBinary deprecated ?

I have imported the latest selenium jar in my java project and I am having a compiling error when I'm trying to use startProfile(FirefoxProfile, File, String). It says : The method is undefined for the type FirefoxBinary. My code looks like this :

FirefoxProfile profile = new FirefoxProfile(myProfileDir);
profile.setPreference("webdriver.load.strategy", "unstable");
try { 
        binary.startProfile(profile, myProfileDir, ""); 

    } catch (IOException e) {
        e.printStackTrace(); 
    }

And when I look at the type hierarchy of the jar file, there is no startProfile(FirefoxProfile, File, String) method in the FirefoxBinary class.

Is there a way to solve this problem, or is there an other method that does the trick ?

Thanks.

lharry
  • 135
  • 1
  • 3
  • 16

2 Answers2

0

The last parameter of startProfile is String..., i.e. varargs. If you don't want any parameter there just don't send any

binary.startProfile(profile, myProfileDir);
Guy
  • 46,488
  • 10
  • 44
  • 88
0

Are you using the latest selenium standalone server jar ? If so, try the previous releases and choose the selenium server zip. Make sure you include all the jars in your build path.

Toms River
  • 196
  • 1
  • 4
  • 13