ohaya Posted December 13, 2018 Share Posted December 13, 2018 Hi, We have been using the IE UDF for awhile, and, partly because we are stuck with having to use an older AutoIT version (3.3.6.1), and partly because of the different types of target web pages we have to do deal with, we have sometimes had to do some things like working with the DOM hierarchy to create events (e.g., we use "$oIE.document.createEvent('MouseEvents')" to create a click event), but even then we start with the $oIE object that we got from the _IECreate() as the basis. Now, we have some scenarios where we have to use Chrome (on Windows) instead of IE, and I have been looking into what is available, e.g., with UDFs, etc., and in particular, I have been looking at the Chrome Webdriver UDF, and I was wondering if there is anyway to get the equivalent of the $oIE object for Chrome in that UDF? What I mean by "equivalent of the $oIE object" is is there a way to get an object using the Chrome Webdriver UDF (e.g., an "$oChrome") that would work with the IE UDF functions like: Local $oForm = _IEFormGetCollection($oChrome, 0) or, per what I said above, like: Local clickEvent = $oChrome.document.createEvent('MouseEvents') so that we could leverage the IE UDF, but for a Chrome browser instead of for an IE browser? Is that even possible? Obviously, the "motivation" for my question is to make it easier for us to try to maintain a single code base that might support both IE and Chrome. Thanks, Jim Link to comment Share on other sites More sharing options...
Danp2 Posted December 13, 2018 Share Posted December 13, 2018 52 minutes ago, ohaya said: so that we could leverage the IE UDF, but for a Chrome browser instead of for an IE browser? Not unless you want to write your own UDF / wrapper. Also, I haven't found a way to return an object from the webdriver. However, you can execute any javascript code with _WD_ExecuteScript, so you should still be able to do something like -- _WD_ExecuteScript($sSession, "evt = document.createEvent('MouseEvents'); evt.button=1;") You may also want to review the situations where this was necessary with the IE UDF to determine if it's still required when using the webdriver. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
ohaya Posted December 13, 2018 Author Share Posted December 13, 2018 Hi Danp2, Thanks for responding and sorry to make this a separate thread from your UDF thread. Do you know if the UDF work with the older (3.3.6.1) AutoIT version that we are using? We are stuck with that AutoIT version for now, because it comes with another COTS product that we are using. Jim Link to comment Share on other sites More sharing options...
Danp2 Posted December 13, 2018 Share Posted December 13, 2018 Hi Jim, I do not know if the UDF will work with your older version of Autoit. You should be able to install more than one version of Autoit, so I'm not understanding why you are "stuck" using this older version. Dan Earthshine 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
junkew Posted December 13, 2018 Share Posted December 13, 2018 You could read faq 31 for all different solutions to tackle recognition of objects. So far i have not seen a tool that unifies all ui technologies in one top generic layer. Windows, web, java, mobile, mainframe seems to be impossible to get one commandset in clicking, sendkeys, snapshotting. Earthshine 1 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets 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