Skip to content

Commit

Permalink
Correctly detect we're using Marionette in tests
Browse files Browse the repository at this point in the history
This seems a little more robust.
  • Loading branch information
shs96c committed Apr 21, 2017
1 parent 515a1cb commit 8298121
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions java/client/test/org/openqa/selenium/testing/JUnit4TestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,14 @@ private static boolean matches(Browser browser, Driver[] drivers) {
break;

case MARIONETTE:
if (browser == Browser.ff && Boolean.getBoolean("webdriver.firefox.marionette")) {
return true;
if (browser != Browser.ff) {
return false;
}
break;
if (System.getProperty("webdriver.firefox.marionette") == null ||
Boolean.getBoolean("webdriver.firefox.marionette")) {
return true;
}
break;

case PHANTOMJS:
if (browser == Browser.phantomjs) {
Expand Down

0 comments on commit 8298121

Please sign in to comment.