pupgram 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.putPostCaptionAction = void 0;
|
|
4
|
-
const error_1 = require("../../error");
|
|
5
4
|
const delay_util_1 = require("../../utils/delay.util");
|
|
5
|
+
const error_1 = require("../../error");
|
|
6
6
|
const putPostCaptionAction = (caption) => {
|
|
7
7
|
return async ({ page, config, logger, defaultTimeout }) => {
|
|
8
8
|
logger.info("Starting to put post caption");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.selectFilesAction = void 0;
|
|
4
|
+
const delay_util_1 = require("../../utils/delay.util");
|
|
4
5
|
const error_1 = require("../../error");
|
|
5
6
|
const selectFilesAction = (filePaths) => {
|
|
6
7
|
return async ({ page, config, logger, defaultTimeout }) => {
|
|
@@ -11,12 +12,13 @@ const selectFilesAction = (filePaths) => {
|
|
|
11
12
|
if (!fileInputElement) {
|
|
12
13
|
throw new error_1.InstagramError("File input element not found");
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
await (0, delay_util_1.delay)(500);
|
|
16
|
+
// logger.debug("File input element found. Making it visible")
|
|
17
|
+
// await page.evaluate((selector) => {
|
|
18
|
+
// const fileInputElement = document.querySelector(selector) as HTMLInputElement
|
|
19
|
+
// fileInputElement.style.display = "block"
|
|
20
|
+
// }, config.fileInputSelector)
|
|
21
|
+
// logger.debug("File input element visible. Uploading files")
|
|
20
22
|
await fileInputElement.uploadFile(...filePaths);
|
|
21
23
|
logger.debug("Files selected");
|
|
22
24
|
};
|