I am trying to run Selenium2 (known as WebDriver) with Java in Firefox. It does not even open the Firefox and throw any error in the console. It stays idle and does nothing..
I am using FF 13 beta Selenium WebDriver 2.23.1(Latest) Win XP
I also tried Downgrading FF version(Changed to 9), It didn't work, Updated WebDriver to Latest(2.23.1) from 2.22, It didn't work
When I run this code in InternetExplorer(8), It will open the browser but will not identify any element and test fails..
My code:
public class Selenium2Example {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
}
}
I've got the same error. Windows + FF 14.0 and
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.21.0</version>
</dependency>
I've debugged the code and i checked that the Thread is stucked on class FirefoxBinary, inside the method
public void clean(FirefoxProfile profile, File profileDir) throws IOException
the profile.isRunning(profileDir) always returns true... that's why nothing happens...
if (Platform.getCurrent().is(Platform.WINDOWS)) {
while (profile.isRunning(profileDir)) {
sleep(500);
}
do {
sleep(500);
} while (profile.isRunning(profileDir));
}
Then i updated to 2.25 and it worked!
<dependency>
<groupId>org.seleniumhq.selenium</groupId>]
<artifactId>selenium-java</artifactId>
<version>2.25.0</version>
</dependency>