Selenium 3.3.1, Gecko Driver 0.15.0, Firefox 42

302 views
Skip to first unread message

Gregma

unread,
Apr 6, 2017, 2:46:11 PM4/6/17
to Selenium Users
Can the above work?  I need to do testing both on the most recent firefox build and older builds back to build 42.  All with Selenium 3.3.x.

 -Greg

kfauto13

unread,
Apr 7, 2017, 6:56:31 AM4/7/17
to Selenium Users
No, it won't work. Only Firefox 48 and on are supported: https://github.com/mozilla/geckodriver/blob/master/README.md

Kristin

Greg Martz

unread,
Apr 7, 2017, 10:48:05 AM4/7/17
to seleniu...@googlegroups.com
Then how are those companies that still need to support older firefox builds supposed to test on those older builds?  Have two completely separate Selenium code bases?


Thanks!
Greg


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/aa2642f1-0356-415b-8a9c-9b50107b35f7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jim Evans

unread,
Apr 7, 2017, 4:55:03 PM4/7/17
to Selenium Users
No, the right thing to do there is to set the capability named `marionette` to `false` for running against older versions of firefox. The language bindings should do the right thing and bypass the use of geckodriver at all, using instead the legacy Firefox driver that works with versions 47 and below of the driver. It's a simple configuration change when you start your session. The details of how that capability gets set may differ depending on what language you use, but the principle is the same.


On Friday, April 7, 2017 at 10:48:05 AM UTC-4, Gregma wrote:
Then how are those companies that still need to support older firefox builds supposed to test on those older builds?  Have two completely separate Selenium code bases?


Thanks!
Greg

Greg Martz

unread,
Apr 10, 2017, 12:26:22 PM4/10/17
to seleniu...@googlegroups.com
I actually tried that, however, got this exception when instantiating the webdriver.

java.lang.ClassCastException: org.openqa.selenium.remote.service.DriverCommandExecutor cannot be cast to org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor

Here is the code:

String firefoxLocation = System.getenv("ProgramFiles") + "\\Mozilla Firefox_42\\firefox.exe";
String geckoLocation = "..\\framework-test\\gecko\\geckodriver_15.exe";

try
{
//Lets determine what browser we will be using, then load the appropriate driver
switch (browser.toLowerCase())
{
case "firefox" :
{
System.setProperty("webdriver.gecko.driver", geckoLocation);
System.setProperty("webdriver.firefox.bin", firefoxLocation);
System.setProperty("webdriver.reap_profile", "false");

//Set the capabilities
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability("marionette", false);
dc.setCapability("acceptSslCerts", true);
dc.setCapability("acceptInsecureCerts", true);
//Set the profile
FirefoxProfile profile = new FirefoxProfile();
profile.setAcceptUntrustedCertificates(true);
profile.setAssumeUntrustedCertificateIssuer(true);
//Disable Firefox Auto-Updating
profile.setPreference("app.update.auto", false);
profile.setPreference("app.update.enabled", false);
dc.setCapability(FirefoxDriver.PROFILE, profile);
driver = new FirefoxDriver(dc);
Log.info("*****Opened Firefox");
break;
}
case "chrome" :
{
System.setProperty("webdriver.chrome.driver", "libs//chromedriver.exe");
driver = new ChromeDriver();
break;
}
}
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.manage().window().maximize();
}
catch (Exception e)
{
Log.info("Class Utils | Method OpenBrowser | Exception desc : " + e.getMessage());
Log.error("Class Utils | Method OpenBrowser | Exception desc : " + e.getMessage());
}
return driver;



Thanks!
Greg

Greg Martz
Test Analyst III - Sr. Software Automation Analyst  |  (425)416-5039  |  gma...@Costco.com 

"Confidentiality Notice:  This e-mail message, including any attachments, is for the sole use to the intended recipient(s) and may contain confidential and privileged information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message."


On Fri, Apr 7, 2017 at 1:55 PM, Jim Evans <james.h....@gmail.com> wrote:
No, the right thing to do there is to set the capability named `marionette` to `false` for running against older versions of firefox. The language bindings should do the right thing and bypass the use of geckodriver at all, using instead the legacy Firefox driver that works with versions 47 and below of the driver. It's a simple configuration change when you start your session. The details of how that capability gets set may differ depending on what language you use, but the principle is the same.


On Friday, April 7, 2017 at 10:48:05 AM UTC-4, Gregma wrote:
Then how are those companies that still need to support older firefox builds supposed to test on those older builds?  Have two completely separate Selenium code bases?


Thanks!
Greg


On Fri, Apr 7, 2017 at 3:56 AM, 'kfauto13' via Selenium Users <selenium-users@googlegroups.com> wrote:
No, it won't work. Only Firefox 48 and on are supported: https://github.com/mozilla/geckodriver/blob/master/README.md

Kristin

On Thursday, April 6, 2017 at 2:46:11 PM UTC-4, Gregma wrote:
Can the above work?  I need to do testing both on the most recent firefox build and older builds back to build 42.  All with Selenium 3.3.x.

 -Greg

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages