mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-11 17:34:58 +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) {
|
||||
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 + '";})');
|
||||
|
|
Loading…
Reference in New Issue
Block a user