Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit 7f3d181

Browse files
committed
added support for edge
1 parent 337cacd commit 7f3d181

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CONSTANTS.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
module.exports = {
22
EXTENSION_FOLDER: "extensions",
33
REQUESTLY_FIREFOX_EXTENSION: "requestly_extension.xpi",
4-
REQUESTLY_CHROME_EXTENSION: "requestly_extension.crx",
4+
REQUESTLY_CHROMIUM_EXTENSION: "requestly_extension.crx",
55
IMPORT_LIST_BUTTON_CLASS: "button.btn-icon.btn-3.btn.btn-primary",
66
BROWSERS: {
77
FIREFOX: "firefox",
88
CHROME: "chrome",
9+
EDGE: "MicrosoftEdge",
910
},
1011
};

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function encodeFile(file) {
1515

1616
/**
1717
* Returns base64 encoded Requestly extension which can be added to selenium browser
18-
* @param {"chrome" | "firefox"} browser Name of the browser for which extension is needed
18+
* @param {"chrome" | "firefox" | "MicrosoftEdge"} browser Name of the browser for which extension is needed
1919
* @returns Encoded Extension
2020
*/
2121
function getRequestlyExtension(browser) {
@@ -28,11 +28,12 @@ function getRequestlyExtension(browser) {
2828
);
2929

3030
case CONSTANTS.BROWSERS.CHROME:
31+
case CONSTANTS.BROWSERS.EDGE:
3132
return encodeFile(
3233
path.join(
3334
__dirname,
3435
CONSTANTS.EXTENSION_FOLDER,
35-
CONSTANTS.REQUESTLY_CHROME_EXTENSION
36+
CONSTANTS.REQUESTLY_CHROMIUM_EXTENSION
3637
)
3738
);
3839

@@ -67,7 +68,7 @@ const importRequestlySharedList = async (driver, sharedListUrl) => {
6768
await driver.wait(
6869
async (driver) => condition.fn(driver),
6970
10000,
70-
"Loading Failed"
71+
"Loading Timeout"
7172
);
7273
// Click on import List button
7374
await driver.findElement(By.css(CONSTANTS.IMPORT_LIST_BUTTON_CLASS)).click();

0 commit comments

Comments
 (0)