Is it possible to use Selenium Grid + AutoIT?

1,152 views
Skip to first unread message

Karthik

unread,
Dec 20, 2013, 2:19:39 AM12/20/13
to seleniu...@googlegroups.com, karthic keyan
Hi Guys,

I need to use the AutoIt in Selenium Grid Environment to automate windows based tasks.
Is it possible to use that combination? Please give me some suggestions?


Thanks,
Karthik

Krishnan Mahadevan

unread,
Dec 20, 2013, 2:23:25 AM12/20/13
to Selenium Users
Theoretically this should be possible but it would require you to build something like a custom webdriver [ you can refer to SikuliDriver for a start ]

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1cc894a7-d9f9-41b1-820e-23234bd80616%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

David

unread,
Dec 20, 2013, 3:21:37 PM12/20/13
to seleniu...@googlegroups.com
Does SikuliDriver even support Grid mode? I was under impression it's for localhost, and at best used via RemoteWebDriver (non-grid mode).

You can do it with different approaches, but you have to build the solution as none are currently ready made to the public. Could extend WebDriver as Krishnan mentions, or extend Grid, or have an external solution that integrates with WebDriver/Grid. I mention one suggested approach (external integration) here:

Krishnan Mahadevan

unread,
Dec 20, 2013, 10:37:55 PM12/20/13
to seleniu...@googlegroups.com
There are two things that need to be taken care of when doing this:
1. Build a client [ like FirefoxDriver, ChromeDriver etc] so that it can be used locally [ without the Grid mode]
2. Build a server side implementation which receives the JSONWire commands translates it into actions and does it [ I am pretty sure its the client implementation that is doing this ] but I think you would still need to build the server side implementation that translates JSONWire commands into specific actions and vice versa. 

For more options, visit https://groups.google.com/groups/opt_out.


--

Elwin Wildschut

unread,
Dec 21, 2013, 4:08:45 AM12/21/13
to seleniu...@googlegroups.com, karthic keyan
It is definitely possible but what are you trying to accomplish
see http://www.autoitscript.com/forum/topic/153520-iuiautomation-ms-framework-automate-chrome-ff-ie/
Then you have an AutoIT only solution to handle Windows, Firefox, Chrome, Internet Explore, Safari. 
You potentially miss then (for non IE) details of the HTML/DOM (unable to get easy access to HTML code)  but you are able to reach and recognize all html controls

David

unread,
Dec 21, 2013, 3:01:41 PM12/21/13
to seleniu...@googlegroups.com
Krishnan, are you commenting on my response or the orignal post?

On #1, I think unless one really prefers local execution without having to run a server instance, it's really not necessary. To me, that's a nice to have feature that's more work to implement to embed the server functionality into the local driver to make it easier a bit for users. Because the workaround is simply to use RemoteWebDriver and connect to instance of the server (whether in Grid mode or not). At last check, there weren't local bindings to SafariDriver in all languages, no reason why need local bindings for AutoIt/Sikuli type drivers. I believe even Appium and ios-driver don't provide local bindings.

On #2, that is definitely a requirement. But it's mostly server side functionality. Except for custom commands that deviate from the standard JSONWireProtocol, if you can map AutoIt/Sikuli commands (click, type, find, screenshot, etc.) to the WebDriver equivalent, then you can reuse existing protocol and codebase. One can then choose to modify the shell/skeleton of Selenium Server source code (in Java) or the one for ios-driver or Appium (in node.js or old version in Python) to do what you want. Those source code already contain the wire protocol handling, you just remove out the code where after the command is received and parsed, how it translates to the actual browser command to execute, replace that with what you want to do in AutoIt or Sikuli. Half the work is already done for you using those exsiting servers. Problem is figuring out how that code works by analyzing source code & making the appropriate modifcations. It's probably easier this way than to build your own server from scratch in my point of view (unless one is talented). And from this elaboration, one can guess that you can simply reuse existing WebDriver client bindings for AutoIt/Sikuli without modification. Where you do have to deviate, if you follow the Appium approach, you can keep it simple by using the javascript execution API/command to execute commands/code that doesn't conform the WebDriver API. For Appium, that was to execute mobile specific commands/features, you can do similar with AutoIt/Sikuli.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

Krishnan Mahadevan

unread,
Dec 23, 2013, 12:21:32 AM12/23/13
to Selenium Users
David,
I was merely adding more context to what I suggested initially.

AFAIK you would need both (1) and (2) if you are to be providing a new WebDriver flavor,because under the hoods I am guessing that RemoteWebDriver still relies on instantiating one of the clients to get the task done.


But I must admit I haven't delved into the details about this so I can't say for sure [ lets say this is just my gut feel, so there are chances that I could be partially incorrect as well]




Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


David

unread,
Dec 24, 2013, 2:37:46 PM12/24/13
to seleniu...@googlegroups.com
Have you worked with Appium and/or ios-driver Krishnan?

AFAIK, you only need (1) if you want to build an integrated local driver that doesn't require a server to run. Actually, that's not exactly true. The server component is just built in to the client component as one piece, so there isn't the "listening" part or that's all hidden under the hood.

But you definitely need (2) for any new driver if it's not built in to the native Selenium server JAR already (or you can choose to extend the Selenium server JAR rather than build a new separate server). The Appium project does just this, makes a new node.js based server (used to by Python) that you run that acts as a Selenium server JAR equivalent but handles only iOS (apps, mobile Safari, over simulator or real device). And you simply connect to Appium via RemoteWebDriver with the right desired capabilities specified. No special local (or not) driver client binding needed. There is no AppiumDriver.

So for building AutoIt/Sikuli driver, you just need to build the server and it could take some special desired capabilities (e.g. mouse coordinate mode for AutoIt, timeouts settings, image path on server and/or image recognition sensitivity/threshold for Sikuli) and it can ignore the rest of the desired capabilities or throw WebDriver exception if there's some specified capability not recognized or liked.

And to me, it never makes sense to do a local driver binding until you've completed the server and got things working well with RemoteWebDriver before you port out a local driver for easier usage by novice Selenium users. The local driver is usually useless once you go to Grid mode, hence why server with remote driver is always best option to start with.

Krishnan Mahadevan

unread,
Dec 26, 2013, 12:16:20 AM12/26/13
to Selenium Users
Umm.. interesting.. David..

yeah, i have started fiddling around with the ios-driver as part of an effort to integrate it into my org's automation framework.

The reason why i stated that you would need a client was perhaps because I might have gotten mixed up with this : https://github.com/ios-driver/ios-driver/blob/dev/client/src/main/java/org/uiautomation/ios/client/uiamodels/impl/RemoteIOSDriver.java


This if you notice is actually the client for the ios-driver which provides a bunch of utilitarian methods that help interact with the app on the device/simulator.

Merely having the server part alone would basically confine a user to have to use all of the WebDriver specs [ which may or may not be useful in all situations ]


I am yet to play around with Appium. But thanks for sharing this information. Perhaps eventually I would end up creating a SikuliDriver just for the learning curve associated with it :)








Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


David

unread,
Jan 18, 2015, 10:18:36 PM1/18/15
to seleniu...@googlegroups.com
You make a good point Krishnan. And ios-driver's server (and client) component may make a good candidate for retrofitting into a SikuliDriver. I've yet to look into that myself.

Just wanted to update that besides Appium being an example of what I was talking about needing only a server and using general WebDriver client, here are some others below. Although since this thread, Appium has released their own custom clients for better integration though I believe the generic WebDriver clients work still.



https://github.com/daluu/SikuliDriverServer -- I tried working out Sikuli using Python/Jython, haven't gotten it working yet. Maybe I'll go direct to Java next time,we'll see.

Krishnan Mahadevan

unread,
Jan 18, 2015, 11:29:54 PM1/18/15
to Selenium Users
Awesome stuff David.. Now I know why you went silent on the forums for quite sometime.. Sounds like you were busy building this :)

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Reply all
Reply to author
Forward
0 new messages