mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-14 05:31:03 +00:00
Update chrome.js
This commit is contained in:
parent
b587b31485
commit
01d9115505
|
@ -1180,10 +1180,10 @@ var ChromeObject = function(interfaces) {
|
||||||
this.prompt = function(s) {
|
this.prompt = function(s) {
|
||||||
return this.getEvaluatedValue('prompt("' + s + '")');
|
return this.getEvaluatedValue('prompt("' + s + '")');
|
||||||
};
|
};
|
||||||
|
|
||||||
this.confirm = function(s) {
|
this.confirm = function(s) {
|
||||||
return this.getEvaluatedValue('(confirm("' + s + '") ? "true" : "false")');
|
return this.getEvaluatedValue('(confirm("' + s + '") ? "true" : "false")');
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setVendor = function(vendor) {
|
this.setVendor = function(vendor) {
|
||||||
var vendor = vendor.toLowerCase();
|
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);
|
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) {
|
this.mouseClick = function(x, y) {
|
||||||
var screenPosition = this.getScreenPosition();
|
var screenPosition = this.getScreenPosition();
|
||||||
this.oAutoIt.callFunction("MouseMove", [screenPosition.x + this.baseScreenX + x, screenPosition.y + this.baseScreenY + y]);
|
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");
|
return this.getEvaluatedValue("document.cookie");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getNumberOfSelectorAll = function(selector) {
|
this.getNumberOfSelectorAll = function(selector) {
|
||||||
return parseInt(this.getEvaluatedValue('document.querySelectorAll("' + selector + '").length'));
|
return parseInt(this.getEvaluatedValue('document.querySelectorAll("' + selector + '").length'));
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setValueOfInputs = function(type, s) {
|
this.setValueOfInputs = function(type, s) {
|
||||||
this.evaluate('document.querySelectorAll("[type=' + type + ']").forEach(function(x){x.value = "' + s + '";})');
|
this.evaluate('document.querySelectorAll("[type=' + type + ']").forEach(function(x){x.value = "' + s + '";})');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user