You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The `broadlink-webhooks` package is published through [npm](https://www.npmjs.co
28
28
29
29
*Please note, if you do not install "globally" (using the "-g" flag) as shown in the installation command above, the `broadlink-webhooks` command will not be available to run in your Terminal or Command window because of `npm`'s installation behavior.*
30
30
31
-
After you've installed `broadlink-webhooks`, you'll also need to install a WebDriver executable for your web browser of choice. `broadlink-webhooks` has been tested with and has menu options for Firefox, Chrome. I have not bothered testing or adding menu options for any other web browsers, such as Edge. Safari was previously supported on macOS, but support was removed for Safari in version 1.0.5 since it was not performing reliably when automated with the latest version of the IFTTT website and was not proving to be worth the extra development and testing effort. As of August 2021, I've tested `broadlink-webhooks` on macOS 11 Big Sur, Windows 10 (May 2021 Update, 21H1), and Linux Mint 20.2 Uma using the latest versions of Firefox and Chrome on all OSes.
31
+
After you've installed `broadlink-webhooks`, you'll also need to install a WebDriver executable for your web browser of choice. `broadlink-webhooks` has been tested with and has menu options for Firefox and Chrome. I have not bothered testing or adding menu options for any other web browsers, such as Edge. Safari was previously supported on macOS, but support was removed for Safari in version 1.0.5 since it was not performing reliably when automated with the latest version of the IFTTT website and was not proving to be worth the extra development and testing effort. As of August 2021, I've tested `broadlink-webhooks` on macOS 11 Big Sur, Windows 10 (May 2021 Update, 21H1), and Linux Mint 20.2 Uma using the latest versions of Firefox and Chrome on all OSes.
32
32
33
33
For Firefox and/or Chrome, you will need to download and install their WebDriver executables manually:
Copy file name to clipboardExpand all lines: broadlink-webhooks.js
+39-23Lines changed: 39 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -205,7 +205,7 @@ let browserToAutomate = null;
205
205
206
206
needNewWebDriver=false;
207
207
208
-
awaitwebDriver.get(iftttLogInURL);
208
+
awaitwebDriver.get('https://ifttt.com/my_services');// This URL will forward to https://ifttt.com/join if not logged in.
209
209
210
210
try{
211
211
awaitwebDriver.switchTo().alert().accept();// There could be a Leave Page confirmation that needs to be accepted on Chrome (but it doesn't hurt to also check on Firefox).
@@ -214,7 +214,7 @@ let browserToAutomate = null;
214
214
// Ignore any error if there is no Leave Page confirmation.
215
215
}
216
216
217
-
if((awaitwebDriver.getCurrentUrl())==iftttLogInURL)throw'NEED TO RE-LOG IN';
217
+
if((awaitwebDriver.getCurrentUrl())=='https://ifttt.com/join')throw'NEED TO RE-LOG IN';
218
218
}catch(checkForLogInError){
219
219
letlogInMethodPromptResponse=awaitprompts([
220
220
{
@@ -398,8 +398,7 @@ let browserToAutomate = null;
398
398
399
399
letcurrentURL=awaitwebDriver.getCurrentUrl();
400
400
401
-
// IFTTT will first redirect to "https://ifttt.com/session" and then finally to "https://ifttt.com/home" after successfully logging in.
awaitwebDriver.get('https://ifttt.com/my_services');// This URL will forward to https://ifttt.com/join if not logged in.
492
491
493
492
try{
494
493
awaitwebDriver.switchTo().alert().accept();// There could be a Leave Page confirmation that needs to be accepted on Chrome (but it doesn't hurt to also check on Firefox).
@@ -497,14 +496,13 @@ let browserToAutomate = null;
497
496
// Ignore any error if there is no Leave Page confirmation.
throw`ORIGINAL APPLET TITLE NOT CORRECT ("${originalAppletTitle}" != "${correctOriginalAppletTitle}")`;
924
-
}
925
-
926
-
awaitthisElement.clear();
927
-
awaitthisElement.sendKeys(Key.ENTER,Key.BACK_SPACE);// Send Enter and then Backspace keys be sure the contents get updated, because the character count doesn't always get updated when only using clear().
928
-
awaitthisElement.clear();// clear() again after that to be sure the title field is empty.
// Cannot get the originalAppletTitle from the actual textarea, but can get it from the div right after it.
926
+
originalAppletTitle=(awaitthatElement.getAttribute('innerHTML')).trim();// getText() doesn't work here for some reason. (Need to trim since there will be a trailing line break.)
throw`ORIGINAL APPLET TITLE NOT CORRECT ("${originalAppletTitle}" != "${correctOriginalAppletTitle}")`;
930
+
}
931
+
932
+
awaitthisElement.clear();
933
+
awaitthisElement.sendKeys(Key.ENTER,Key.BACK_SPACE);// Send Enter and then Backspace keys be sure the contents get updated, because the character count doesn't always get updated when only using clear().
934
+
awaitthisElement.clear();// clear() again after that to be sure the title field is empty.
@@ -1137,7 +1153,7 @@ let browserToAutomate = null;
1137
1153
awaitwebDriver.switchTo().alert().accept();
1138
1154
1139
1155
letcurrentURL=awaitwebDriver.getCurrentUrl();
1140
-
while((currentURL!='https://ifttt.com/home')&&(currentURL!='https://ifttt.com')){// Could end up at either of these URLs after archiving an applet.
1156
+
while((currentURL!='https://ifttt.com/explore')&&(currentURL!='https://ifttt.com/')){// Could end up at either of these URLs after archiving an applet.
0 commit comments