Jump to content
Sign in to follow this  
ohaya

"Bridging" IE UDF and (Chrome) Webdriver UDFs?

Recommended Posts

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

 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...