mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-09 21:26:04 +00:00
Update chrome.js
This commit is contained in:
parent
922dd56410
commit
3c1eefa68e
|
@ -490,6 +490,15 @@ var ChromeObject = function() {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.getElementPosition = function(selector) {
|
||||||
|
var result = this.getEvaluatedValue('(function() { var el = document.querySelector("' + selector + '").getBoundingClientRect(); return [el.left, el.top].join(","); })();');
|
||||||
|
var pos = result.split(',');
|
||||||
|
return {
|
||||||
|
"x": parseInt(pos[0]),
|
||||||
|
"y": parseInt(pos[1])
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
this.getPageHeight = function() {
|
this.getPageHeight = function() {
|
||||||
var height = 0;
|
var height = 0;
|
||||||
|
|
||||||
|
@ -597,6 +606,8 @@ var ChromeObject = function() {
|
||||||
return this.evaluate('document.querySelector("' + selector + '").value = decodeURIComponent("' + s + '")');
|
return this.evaluate('document.querySelector("' + selector + '").value = decodeURIComponent("' + s + '")');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.
|
||||||
|
|
||||||
this.create();
|
this.create();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user