chrome-aws-lambda
Version:
Chromium Binary for AWS Lambda and Google Cloud Functions
66 lines • 2.6 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
let Super = null;
try {
Super = require('puppeteer/lib/cjs/puppeteer/common/Page').Page;
}
catch (error) {
Super = require('puppeteer-core/lib/cjs/puppeteer/common/Page').Page;
}
Super.prototype.block = function (predicates) {
return this._client.send('Network.setBlockedURLs', {
urls: predicates
});
};
Super.prototype.clickAndWaitForNavigation = function (selector, options) {
return this.mainFrame().clickAndWaitForNavigation(selector, options);
};
Super.prototype.clickAndWaitForRequest = function (selector, pattern, options) {
return this.mainFrame().clickAndWaitForRequest(selector, pattern, options);
};
Super.prototype.clickAndWaitForResponse = function (selector, pattern, options) {
return this.mainFrame().clickAndWaitForResponse(selector, pattern, options);
};
Super.prototype.count = function (selector) {
return this.mainFrame().count(selector);
};
Super.prototype.exists = function (selector) {
return this.mainFrame().exists(selector);
};
Super.prototype.fillFormByLabel = function (selector, data) {
return this.mainFrame().fillFormByLabel(selector, data);
};
Super.prototype.fillFormByName = function (selector, data) {
return this.mainFrame().fillFormByName(selector, data);
};
Super.prototype.fillFormBySelector = function (selector, data) {
return this.mainFrame().fillFormBySelector(selector, data);
};
Super.prototype.fillFormByXPath = function (selector, data) {
return this.mainFrame().fillFormByXPath(selector, data);
};
Super.prototype.number = function (selector, decimal = '.', property = 'textContent') {
return this.mainFrame().number(selector, decimal, property);
};
Super.prototype.selectByLabel = function (selector, ...values) {
return this.mainFrame().selectByLabel(selector, ...values);
};
Super.prototype.string = function (selector, property = 'textContent') {
return this.mainFrame().string(selector, property);
};
Super.prototype.waitUntilVisible = function (selector, options) {
return this.mainFrame().waitUntilVisible(selector, options);
};
Super.prototype.waitWhileVisible = function (selector, options) {
this.coverage.startCSSCoverage();
return this.mainFrame().waitWhileVisible(selector, options);
};
Super.prototype.withTracing = function (options, callback) {
return this.tracing.start(options).then(async () => {
if (typeof callback === 'function') {
await callback(this);
}
return await this.tracing.stop();
});
};
//# sourceMappingURL=Page.js.map