array Posted December 24, 2018 Share Posted December 24, 2018 (edited) Local $oTags = _IETagNameGetCollection($oIE_facebook, 'input') For $oTr In $oTags If $oTr.classname == "_58al" Then $oTr.value = '200' $oTr.fireEvent("onchange") $oTr.fireEvent("onblur") EndIf Next can change if manual keypress i can change on i use javascirpt expandcollapse popupfunction fireEvent(node, eventName) { // Make sure we use the ownerDocument from the provided node to avoid cross-window problems var doc; if (node.ownerDocument) { doc = node.ownerDocument; } else if (node.nodeType == 9){ // the node may be the document itself, nodeType 9 = DOCUMENT_NODE doc = node; } else { throw new Error("Invalid node passed to fireEvent: " + node.id); } if (node.dispatchEvent) { // Gecko-style approach (now the standard) takes more work var eventClass = ""; // Different events have different event classes. // If this switch statement can't map an eventName to an eventClass, // the event firing is going to fail. switch (eventName) { case "click": // Dispatching of 'click' appears to not work correctly in Safari. Use 'mousedown' or 'mouseup' instead. case "mousedown": case "mouseup": eventClass = "MouseEvents"; break; case "focus": case "change": case "blur": case "select": eventClass = "HTMLEvents"; break; default: throw "fireEvent: Couldn't find an event class for event '" + eventName + "'."; break; } var event = doc.createEvent(eventClass); event.initEvent(eventName, true, true); // All events created as bubbling and cancelable. event.synthetic = true; // allow detection of synthetic events // The second parameter says go ahead with the default action node.dispatchEvent(event, true); } else if (node.fireEvent) { // IE-old school style, you can drop this if you don't need to support IE8 and lower var event = doc.createEventObject(); event.synthetic = true; // allow detection of synthetic events node.fireEvent("on" + eventName, event); } }; document.getElementsByTagName("input")[i].value = 30; fireEvent(document.getElementsByTagName("input"), "change"); fireEvent(document.getElementsByTagName("input"), "blur"); but i can't use on autoit Edited December 24, 2018 by array Link to comment Share on other sites More sharing options...
Developers Jos Posted December 24, 2018 Developers Share Posted December 24, 2018 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
array Posted December 24, 2018 Author Share Posted December 24, 2018 (edited) thank Moderation Edited December 24, 2018 by array Link to comment Share on other sites More sharing options...
array Posted December 24, 2018 Author Share Posted December 24, 2018 pls help me Link to comment Share on other sites More sharing options...
Juvigy Posted January 2, 2019 Share Posted January 2, 2019 There may be several reasons, for example security, frames and so on. Put a msgbox in the IF statement to verify you get to the desired element. If the msg pops, we can continue from there. Link to comment Share on other sites More sharing options...
Danp2 Posted January 2, 2019 Share Posted January 2, 2019 Have you checked to see if there are multiple elements with that same class? I get two matching elements when I check Facebook. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
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