How to use selenium webdriver to automate application hosted on citrix?

7310 views
Skip to first unread message

tiwariso...@gmail.com

unread,
May 7, 2015, 4:56:01 AM5/7/15
to seleniu...@googlegroups.com
IS IT POSSIBLE TO AUTOMATE THE APPLICATION LAUNCHED IN Citrix?
If Yes, Please explain how?? I am not able to click on IE browse icon after logging in Citrix Following steps i am able to record and playback with Selenium IDE but not able to recognize any element after login when i run my script with Selenium web driver:
1.Launch firefox with citrix URL.
2.Enter username , password and click on login button (Above two steps are running with both IDE and web driver)
 3.Click on IE icon which opens new IE browser on which application URL is to be entered.
When i run test it throws error on 3rd step as it is not able to click on icon

Amol Qa

unread,
Sep 29, 2015, 5:32:52 AM9/29/15
to Selenium Users
Hi,

Have you found solution for your query?
I have achieved little bit using Selenium + Sikuli.

ranjan anand

unread,
Sep 29, 2015, 11:07:48 PM9/29/15
to seleniu...@googlegroups.com
Sikuli and Autoit is the option for playing with image type of objects.

If you use Sikuli, then first add the Sikuli jar file into the build path and take the screenshot of IE icon and then use the below code to click on the IE browser icon.

Screen s = new Screen();
s.click("xyz.png");

--
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/5ea4b312-4133-49bf-a7d6-65dcf497ab18%40googlegroups.com.

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

bert Zhang

unread,
Oct 22, 2015, 10:55:10 PM10/22/15
to Selenium Users
hi have u got any solution about using selenium to set up citrix browser?

David

unread,
Oct 23, 2015, 11:36:19 PM10/23/15
to Selenium Users
Do you have access to the Citrix desktop like a native remote desktop login (and able to install software, copy/download files there, or are you restricted to a sandboxed environment that only gives you a browser on login (no desktop) or with read only access?

If you have desktop and write access, or can work with your IT department to configure things. The optimal solution if you must go through Citrix, is to have a desktop and not just auto launch browser on login. And from this setup, you or your IT department has preconfigured the Citrix user account to already have either of the following on the desktop/server's filesystem:

* Selenium server JAR with batch files, etc. to which you can start up a Selenium grid node, or a standalone RemoteWebDriver connection to then run tests to connect to which can control the browser within Citrix session.

* Selenium test files and test framework/runner so you can directly execute the tests there in the Citrix session locally with local instance of FirefoxDriver or other browser.

You just need those available already when you login then you just run the tests from there or the batch scripts to start up Selenium connection and you can then run tests remotely to launch the Selenium browser tests to that Citrix session. Think of this as treating Citrix setup as if they were remote machines you access with remote desktop, although you would need to connect to Citrix manually from a browser first to establish the remote desktop session before you can then run the tests (and see the action of browser automation of a browser within a browser)

But if you are truly sandboxed, you would have to resort to Sikuli and like tools as others have mention. I doubt AutoIt will work as that's not image recognition based. It won't recognize Windows GUI objects within a remote desktop session inside a browser.

bert Zhang

unread,
Oct 26, 2015, 1:42:06 PM10/26/15
to Selenium Users
Hi David

i attach a screen recorder of how i manually launch citrix, i am also agree with you that i need to use remotewebdriver, but i also need some clarification about how to set the property to remotewebdriver and what stuff i should talk with out architecture team to do the precofiguration

i will be really appreciate that if you could take a look at it and provider more information

thank you
Recording #3.mp4
Message has been deleted

David

unread,
Oct 28, 2015, 2:57:10 AM10/28/15
to Selenium Users
Bert, just saw your video. That looks tricky to automate because Citrix integrates the remote browser (remote as in it really comes from Citrix server like a remote desktop session) with your local desktop (making it look like it's a native local browser on your computer).

A basic Selenium setup won't work there. Not sure AutoIt or desktop GUI automation tools would work either. But Sikuli and image recognition based tools would still work as a last resort. For Selenium to work, you would need a full desktop exposed or at a minimum Windows Explorer (and have Selenium standalone server JAR in that Windows Explorer somewhere). The Windows Explorer I'm talking about is the option I see you have when you login to Citrix (you picked IE but could have picked something else in that list like Windows Explorer.

With Windows Explorer, you then run/start the Selenium server (perhaps with a batch file you double-click). Once done and that's running in a command prompt popup I assume, you could try to connect with RemoteWebDriver (with IE capabilities) using IP address or hostname of the Citrix server you log on to and hopefully that will launch a "visible" IE browser for you to see the automation run against. For IE, you'll also need the IEDriverServer on the Windows Explorer and have it set in system path (by batch file you double click to start the server JAR).

If that doesn't work, you'll need a full remote deskop exposed from Citrix.

వినయ్ కుమార్ నల్ల

unread,
Feb 17, 2016, 9:10:29 PM2/17/16
to Selenium Users
Hi David, even i am facing same issue,could you please explain the detail level  below  reply statement then i can solve my problem

David

unread,
Feb 19, 2016, 1:30:51 AM2/19/16
to Selenium Users
See my last comment. If you have the same setup as Bert (see his attached video demo of the Citrix environment), then your best option is to go with a tool like Sikuli and other image recognition tools. Selenium isn't going to work.

But if you wished to used Selenium, a Selenium API wrapper to those tools might be useful. None exist for Sikuli yet (not talking about SikuliFirefoxDriver) but there is one for AutoPy: https://github.com/daluu/AutoPyDriverServer

Tina Galani

unread,
Nov 5, 2017, 2:57:28 AM11/5/17
to Selenium Users
Hi,

Can you please guide me on how to access citrix ie using sikuli or any other method?

sundari sundu

unread,
Nov 6, 2017, 7:17:28 AM11/6/17
to Selenium Users
It may be because the webdriver is unable to identify the icon you are searching for, you can give position of element using x,y coordinates and check whether it is openinv new

sundari sundu

unread,
Nov 6, 2017, 7:19:09 AM11/6/17
to Selenium Users
it may be because driver is unable to find the icon that you are searching for, try to locate the element with x,y coordinates and click on the element later check whether kr is opening new window, if so try to handle new window to continue with your task

David

unread,
Nov 6, 2017, 3:47:16 PM11/6/17
to Selenium Users
FYI, I blogged about this gray area of automation after helping out in this thread post a while back. One might want to read it and rethink about their app and test infrastructure and how best to deal with it, because it is not straightforward like regular web/desktop test automation.

Anil Kumar

unread,
Aug 27, 2021, 2:10:31 AMAug 27
to Selenium Users
was this possible to automate an app inside citrix using selenium?

David

unread,
Sep 15, 2021, 1:58:33 PMSep 15
to Selenium Users
>> was this possible to automate an app inside citrix using selenium?

no, unless Selenium is also running inside Citrix alongside the app being tested, which is highly unlikely.
Reply all
Reply to author
Forward
0 new messages