-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use FileDetector to install Firefox addons if one is set on the driver
- Loading branch information
1 parent
60b2cff
commit 5708473
Showing
3 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ | |
import org.openqa.selenium.remote.Command; | ||
import org.openqa.selenium.remote.CommandExecutor; | ||
import org.openqa.selenium.remote.DriverCommand; | ||
import org.openqa.selenium.remote.LocalFileDetector; | ||
import org.openqa.selenium.remote.RemoteWebDriver; | ||
import org.openqa.selenium.remote.SessionId; | ||
import org.openqa.selenium.remote.UnreachableBrowserException; | ||
|
@@ -503,8 +504,12 @@ public void testFirefoxCanNativelyClickOverlappingElements() { | |
public void canAddRemoveExtensions() { | ||
Path extension = InProject.locate("third_party/firebug/favourite_colour-1.1-an+fx.xpi"); | ||
|
||
((HasExtensions) driver).installExtension(extension); | ||
((HasExtensions) driver).uninstallExtension("[email protected]"); | ||
if (driver.getClass().equals(RemoteWebDriver.class)) { | ||
((RemoteWebDriver) driver).setFileDetector(new LocalFileDetector()); | ||
} | ||
|
||
String id = ((HasExtensions) driver).installExtension(extension); | ||
((HasExtensions) driver).uninstallExtension(id); | ||
} | ||
|
||
@Test | ||
|