Letraindusoir Posted September 16, 2021 Posted September 16, 2021 Thank two masters! https://stackoverflow.com/questions/5371139/window-scrolltop-vs-document-scrolltop https://stackoverflow.com/questions/19291873/window-width-not-the-same-as-media-query $jQuery(window). $jQuery(document). This writing-form is still more common. My browser is the IE11. There is no problem running in a jquery environment. But in Au3 if the jquery selector is not a string form it reports an error. But nothing, and alternatives can be done...
Letraindusoir Posted September 26, 2021 Posted September 26, 2021 #include <IE.au3> Local $sID = "div1" Local $oIE = _IECreate() _IENavigate($oIE, @ScriptDir & "style.htm") Local $Str = _ 'function getEleStyle(sid) {' & _ ' var res = "";' & _ ' var ele = document.getElementById(sid);' & _ ' var css =(ele.currentStyle ? ele.currentStyle: window.getComputedStyle(ele, null));' & _ ' var nam = "";' & _ ' var val = "";' & _ ' for (var i = 0; i < css.length; i++) {' & _ ' nam = css.item(i);' & _ ' val = css.getPropertyValue(nam);' & _ ' res += nam + " = " + val + "%";' & _ ' };' & _ ' return res;' & _ '};' & _ 'var sss = getEleStyle(' & $sID & ');sss;' Local $Res = $oIE.document.parentWindow.eval($Str) MsgBox(4096,"",$Res) Again for au3 running the javascript-script. The code is as above.Web-page file in the attachment. After opening web file directly with a browser (IE11) ,it's running properly. But turning to the au3 environment it don't work. What is the problem? thanks advance! style.htm
Danp2 Posted September 30, 2021 Posted September 30, 2021 @LetraindusoirYour post doesn't appear to belong in this thread since it doesn't involve jQuery. 🙄 If you still need help, suggest that you start a new thread in the GH&S section. Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now