Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@copart/tx-title-submission

Package Overview
Dependencies
Maintainers
8
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@copart/tx-title-submission - npm Package Compare versions

Comparing version 1.0.18 to 1.0.19

69

lib/documentSubmission.js

@@ -81,4 +81,2 @@ "use strict";

;
var browserSubmission =

@@ -146,3 +144,2 @@ /*#__PURE__*/

var querySelector = document.querySelector(x.fieldSelector);
console.log(querySelector);

@@ -177,6 +174,20 @@ if (querySelector) {

_context.next = 40;
return (0, _puppeteer.clickButton)(page, previewPage.htmlSelector);
return page.evaluate(function (x) {
var querySelector = document.querySelector(x.fieldSelector);
if (querySelector) {
querySelector.click();
} else {
successClickFlag = false;
}
}, {
fieldSelector: previewPage.htmlSelector
});
case 40:
_context.next = 42;
return (0, _puppeteer.waitForNavigation)(page);
case 42:
_context.next = 44;
return page.screenshot({

@@ -186,17 +197,31 @@ path: "screenshots/".concat(data.lotId, "_3.png")

case 42:
case 44:
documentPage = (0, _misc.getStepButton)(_fieldsStructure.default, _config.documentSteps.DOCUMENT_PAGE);
_context.next = 45;
_context.next = 47;
return page.waitForSelector(documentPage.htmlSelector);
case 45:
_context.next = 47;
return (0, _puppeteer.feedAllStepFields)(page, _fieldsStructure.default, _config.documentSteps.DOCUMENT_PAGE, data);
case 47:
_context.next = 49;
return (0, _puppeteer.clickButton)(page, documentPage.htmlSelector);
return (0, _puppeteer.feedAllStepFields)(page, _fieldsStructure.default, _config.documentSteps.DOCUMENT_PAGE, data);
case 49:
_context.next = 51;
return page.evaluate(function (x) {
var querySelector = document.querySelector(x.fieldSelector);
if (querySelector) {
querySelector.click();
} else {
successClickFlag = false;
}
}, {
fieldSelector: documentPage.htmlSelector
});
case 51:
_context.next = 53;
return (0, _puppeteer.waitForNavigation)(page);
case 53:
_context.next = 55;
return page.screenshot({

@@ -206,7 +231,7 @@ path: "screenshots/".concat(data.lotId, "_4.png")

case 51:
_context.next = 53;
case 55:
_context.next = 57;
return browser.close();
case 53:
case 57:
return _context.abrupt("return", {

@@ -219,6 +244,6 @@ status: "success",

case 56:
_context.prev = 56;
case 60:
_context.prev = 60;
_context.t0 = _context["catch"](6);
_context.next = 60;
_context.next = 64;
return page.screenshot({

@@ -228,7 +253,7 @@ path: "screenshots/".concat(data.lotId, "_ERROR.png")

case 60:
_context.next = 62;
case 64:
_context.next = 66;
return browser.close();
case 62:
case 66:
throw {

@@ -241,3 +266,3 @@ status: "error",

case 63:
case 67:
case "end":

@@ -247,3 +272,3 @@ return _context.stop();

}
}, _callee, this, [[6, 56]]);
}, _callee, this, [[6, 60]]);
}));

@@ -250,0 +275,0 @@

{
"name": "@copart/tx-title-submission",
"version": "1.0.18",
"version": "1.0.19",
"description": "Automates texas title submission via headless browser",

@@ -5,0 +5,0 @@ "main": "./lib/export.js",

@@ -36,3 +36,3 @@ import {

}
};
}

@@ -56,3 +56,3 @@ const browserSubmission = async (data, credentials) => {

const mainPage = getStepButton(fieldStructure, documentSteps.MAIN_PAGE);
console.log("mainPage search", mainPage)
console.log("mainPage search", mainPage);
await page.waitForSelector(mainPage.htmlSelector);

@@ -66,19 +66,18 @@ await feedAllStepFields(

await page.screenshot({
path: `screenshots/${data.lotId}_3.png`
});
// await clickLink(page, mainPage.htmlSelector);
await page.evaluate(
(x) => {
let querySelector = document.querySelector(x.fieldSelector)
console.log(querySelector)
if (querySelector) {
querySelector.click();
} else {
successClickFlag = false
}
},
{ fieldSelector: mainPage.htmlSelector }
)
// await page.keyboard.press("Enter");
await waitForNavigation(page)
path: `screenshots/${data.lotId}_3.png`
});
// await clickLink(page, mainPage.htmlSelector);
await page.evaluate(
x => {
let querySelector = document.querySelector(x.fieldSelector);
if (querySelector) {
querySelector.click();
} else {
successClickFlag = false;
}
},
{ fieldSelector: mainPage.htmlSelector }
);
// await page.keyboard.press("Enter");
await waitForNavigation(page);

@@ -88,3 +87,3 @@ await page.screenshot({

});
console.log("before previewPage ")
console.log("before previewPage ");

@@ -95,7 +94,19 @@ const previewPage = getStepButton(

);
console.log("previewPage ", previewPage)
console.log("previewPage ", previewPage);
await page.waitForSelector(previewPage.htmlSelector);
await clickButton(page, previewPage.htmlSelector);
await page.evaluate(
x => {
let querySelector = document.querySelector(x.fieldSelector);
if (querySelector) {
querySelector.click();
} else {
successClickFlag = false;
}
},
{ fieldSelector: previewPage.htmlSelector }
);
// await page.keyboard.press("Enter");
await waitForNavigation(page);

@@ -116,3 +127,15 @@ await page.screenshot({

);
await clickButton(page, documentPage.htmlSelector);
await page.evaluate(
x => {
let querySelector = document.querySelector(x.fieldSelector);
if (querySelector) {
querySelector.click();
} else {
successClickFlag = false;
}
},
{ fieldSelector: documentPage.htmlSelector }
);
// await page.keyboard.press("Enter");
await waitForNavigation(page);

@@ -119,0 +142,0 @@ await page.screenshot({

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc