@copart/tx-title-submission
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -80,3 +80,3 @@ "use strict"; | ||
_regenerator.default.mark(function _callee2(data, credentials) { | ||
var _ref2, browser, page, loginSubmit, newApplicationSubmit, newApplicationConfirmSubmit, vehicleInfoSubmit, lienInfoSubmit, prevOwnerInfoSubmit, applicantInfoSubmit, documentTypeSubmit, uploadFileSubmit; | ||
var _ref2, browser, page, loginSubmit, newApplicationSubmit, newApplicationConfirmSubmit, vehicleInfoSubmit, lienInfoSubmit, prevOwnerInfoSubmit, applicantInfoSubmit, documentTypeSubmit; | ||
@@ -270,51 +270,19 @@ return _regenerator.default.wrap(function _callee2$(_context2) { | ||
case 92: | ||
console.log('SUPPORTING_DOCUMENTS_TWO Information'); | ||
_context2.next = 95; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_9SUPPORTING_DOCUMENTS_TWO.png") | ||
}); | ||
case 95: | ||
uploadFileSubmit = (0, _misc.getStepButton)(_fieldsStructure.default, _config.steps.SUPPORTING_DOCUMENTS_TWO); | ||
_context2.next = 98; | ||
return page.waitForSelector(uploadFileSubmit.htmlSelector); | ||
case 98: | ||
_context2.next = 100; | ||
return (0, _puppeteer.feedAllStepFields)(page, _fieldsStructure.default, _config.steps.SUPPORTING_DOCUMENTS_TWO, data); | ||
case 100: | ||
_context2.next = 102; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_90SUPPORTING_DOCUMENTS_TWO.png") | ||
}); | ||
case 102: | ||
_context2.next = 104; | ||
return (0, _puppeteer.clickButton)(page, uploadFileSubmit.htmlSelector); | ||
case 104: | ||
_context2.next = 106; | ||
return page.screenshot({ | ||
path: "screenshots/".concat(data.lotId, "_91SUPPORTING_DOCUMENTS_TWO.png") | ||
}); | ||
case 106: | ||
_context2.next = 108; | ||
_context2.next = 94; | ||
return browser.close(); | ||
case 108: | ||
_context2.next = 115; | ||
case 94: | ||
_context2.next = 101; | ||
break; | ||
case 110: | ||
_context2.prev = 110; | ||
case 96: | ||
_context2.prev = 96; | ||
_context2.t0 = _context2["catch"](5); | ||
_context2.next = 114; | ||
_context2.next = 100; | ||
return browser.close(); | ||
case 114: | ||
case 100: | ||
throw _context2.t0; | ||
case 115: | ||
case 101: | ||
case "end": | ||
@@ -324,3 +292,3 @@ return _context2.stop(); | ||
} | ||
}, _callee2, this, [[5, 110]]); | ||
}, _callee2, this, [[5, 96]]); | ||
})); | ||
@@ -327,0 +295,0 @@ |
@@ -341,3 +341,3 @@ "use strict"; | ||
_context7.next = 2; | ||
return feedField(page, field.htmlSelector, data[field.name] ? data[field.name] : field.defaultValue, field.inputType, field.editable); | ||
return feedField(page, field.htmlSelector, data[field.name] === "" || data[field.name] === undefined || data[field.name] === null ? field.defaultValue : data[field.name], field.inputType, field.editable); | ||
@@ -344,0 +344,0 @@ case 2: |
{ | ||
"name": "@copart/tx-title-submission", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Automates texas title submission via headless browser", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -115,12 +115,12 @@ import { browserLaunch, goToPage, clickButton, feedAllStepFields, waitForNavigation } from "./utilities/puppeteer"; | ||
console.log('SUPPORTING_DOCUMENTS_TWO Information') | ||
await page.screenshot({ path: `screenshots/${data.lotId}_9SUPPORTING_DOCUMENTS_TWO.png` }) | ||
// console.log('SUPPORTING_DOCUMENTS_TWO Information') | ||
// await page.screenshot({ path: `screenshots/${data.lotId}_9SUPPORTING_DOCUMENTS_TWO.png` }) | ||
const uploadFileSubmit = getStepButton(fieldStructure, steps.SUPPORTING_DOCUMENTS_TWO) | ||
await page.waitForSelector(uploadFileSubmit.htmlSelector); | ||
await feedAllStepFields(page, fieldStructure, steps.SUPPORTING_DOCUMENTS_TWO, data); | ||
await page.screenshot({ path: `screenshots/${data.lotId}_90SUPPORTING_DOCUMENTS_TWO.png` }) | ||
// const uploadFileSubmit = getStepButton(fieldStructure, steps.SUPPORTING_DOCUMENTS_TWO) | ||
// await page.waitForSelector(uploadFileSubmit.htmlSelector); | ||
// await feedAllStepFields(page, fieldStructure, steps.SUPPORTING_DOCUMENTS_TWO, data); | ||
// await page.screenshot({ path: `screenshots/${data.lotId}_90SUPPORTING_DOCUMENTS_TWO.png` }) | ||
await clickButton(page, uploadFileSubmit.htmlSelector); | ||
await page.screenshot({ path: `screenshots/${data.lotId}_91SUPPORTING_DOCUMENTS_TWO.png` }) | ||
// await clickButton(page, uploadFileSubmit.htmlSelector); | ||
// await page.screenshot({ path: `screenshots/${data.lotId}_91SUPPORTING_DOCUMENTS_TWO.png` }) | ||
@@ -127,0 +127,0 @@ //TODO: Loop through steps rather than handling each one if there are no special cases to handle in each step. |
@@ -97,3 +97,3 @@ const puppeteer = require('puppeteer'); | ||
await asyncForEach(stepFields, async (field) => { | ||
await feedField(page, field.htmlSelector, data[field.name] ? data[field.name] : field.defaultValue, field.inputType, field.editable) | ||
await feedField(page, field.htmlSelector, (data[field.name] === "" || data[field.name] === undefined || data[field.name] === null )? field.defaultValue : data[field.name], field.inputType, field.editable) | ||
}) | ||
@@ -100,0 +100,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69107
2129