Update chrome.js

This commit is contained in:
Namhyeon Go 2022-05-02 23:56:57 +09:00 committed by GitHub
parent b587b31485
commit 01d9115505
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1180,10 +1180,10 @@ var ChromeObject = function(interfaces) {
this.prompt = function(s) {
return this.getEvaluatedValue('prompt("' + s + '")');
};
this.confirm = function(s) {
return this.getEvaluatedValue('(confirm("' + s + '") ? "true" : "false")');
};
this.confirm = function(s) {
return this.getEvaluatedValue('(confirm("' + s + '") ? "true" : "false")');
};
this.setVendor = function(vendor) {
var vendor = vendor.toLowerCase();
@ -1207,6 +1207,10 @@ var ChromeObject = function(interfaces) {
Toolkit.sendClick(this.pageId.substring(0, 6), this.baseScreenX + x, this.baseScreenY + y, 1);
};
this.vSendKeys = function(s) {
Toolkit.sendKeys(this.pageId.substring(0, 6), s);
};
this.mouseClick = function(x, y) {
var screenPosition = this.getScreenPosition();
this.oAutoIt.callFunction("MouseMove", [screenPosition.x + this.baseScreenX + x, screenPosition.y + this.baseScreenY + y]);
@ -1229,9 +1233,9 @@ var ChromeObject = function(interfaces) {
return this.getEvaluatedValue("document.cookie");
};
this.getNumberOfSelectorAll = function(selector) {
return parseInt(this.getEvaluatedValue('document.querySelectorAll("' + selector + '").length'));
};
this.getNumberOfSelectorAll = function(selector) {
return parseInt(this.getEvaluatedValue('document.querySelectorAll("' + selector + '").length'));
};
this.setValueOfInputs = function(type, s) {
this.evaluate('document.querySelectorAll("[type=' + type + ']").forEach(function(x){x.value = "' + s + '";})');