firefox 47.0 browser incompatibility with selenium 2.53.0
Upgrade Firefox to 47.0.1 and selenium to 2.53.1.This should work.
Selenium 2.53 or 2.48 not working in Firefox 48.0
I found another solution for my question with Firefox 48 and Selenium 3.0.0(Beta 3) because Selenium 2.48 didn't work.
If you want run selenium script then you have to download....
Selenium 3.0.0(Beta 3) - http://www.seleniumhq.org/download/
GeckoDriver exe - http://www.seleniumhq.org/download/
put below code in your script
public class FirefoxTest{
public static void main(String args[]) throws InterruptedException{
System.setProperty("webdriver.gecko.driver", "Path + geckodriver.exe");
//For E.g ("webdriver.gecko.driver", "C://geckodriver.exe")
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette",true);
WebDriver driver = new FirefoxDriver(capabilities);
String baseUrl = "https://www.google.com";
driver.get(baseUrl);
}
}
Selenium 2.53.1 does not work on FireFox 48
Just like the other drivers available to Selenium from other browser vendors, Mozilla has released an executable that will run alongside the browser.
You can download the latest executable geckodriver from here
Add downloaded executable geckodriver to system path
The Selenium client bindings will try to locate the geckodriver (or wires) executable from the system path. You will need to add the directory containing the executable to the system path.
On Unix systems you can do the following to append it to your system’s search path, if you’re using a bash-compatible shell:
export PATH=$PATH:/path/to/directory/of/executable/downloaded/in/previous/step
On Windows you need to update the Path system variable to add the full directory path to the executable geckodriver. The principle is the same as on Unix.
After all above stuff you need to Initialize FireFoxDriver
as below :-
var driver = new FirefoxDriver(new FirefoxOptions());
Note :- Follow this link for the solution of this problem with other programming language.
Could not locate Firefox on the current system (Firefox 47)
The latest Firefox 48 and Selenium Webdriver 3.0.0 solved this particular issue.
Related Topics
Redirect to an External Url from Controller Action in Spring MVC
Delete Directories Recursively in Java
Javafx: Location Is Not Set Error
Differencebetween Method Overloading and Overriding
Differencebetween Join and Join Fetch When Using JPA and Hibernate
Javafx "Location Is Required." Even Though It Is in the Same Package
How to Store Date/Time and Timestamps in Utc Time Zone with JPA and Hibernate
Garbage Collection of String Literals
Mapping Postgresql JSON Column to a Hibernate Entity Property
How to Escape Special HTML Characters in Jsp
Rotating Coordinate Plane for Data and Text in Java
Controlling Maven Final Name of Jar Artifact
How to Handle Invalid Ssl Certificates with Apache Httpclient
Java Reverse an Int Value Without Using Array