Is it possible to automate Outlook using Selenium? - selenium

I am trying to create a Python script that logs in to my Outlook account, opens the unread messages, and if it has attachments it downloads them.
However, after login, it seems that I am stuck and cannot do anything.
Are these activities out of the scope of Selenium?

Where do you run your python scripts?
You may find REST API helpful. But if you are talking about the desktop edition here is what MS states:
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution. Read more about that in the Considerations for server-side Automation of Office article.
If you deal only with Exchange profiles consider using EWS instead. See EWS Managed API, EWS, and web services in Exchange for more information.

If you are talking about outlook.com then yes, it's possible. I guess it's gonna require a lot of xpath though...

Related

Lync / Skype 4 Business Bot

I'd like to create a simple server service that can perform the following tasks:
Retrieve presence info for specified user(s).
Send message to specified user.
From what i've been reading, and because i'm siting server side I could choose to use UCMA 5.0? But i'm seeing a lot of push of the new UCWA SDK and working with the UCWA rest services. Is there any particular reason why i would use UCWA server side rather than just the UCMA API? I read that UCWA will, in the future, be support by Microsoft for Cloud --- Any input and experiences shared on this would be great.
Thanks, mike
UCWA will be at some point be supported in Office 365 indeed. So if you create an application with UCWA you can expect it will run in the next future on your S4B On-Prem as well as on Office 365.
I have to say anyway this support for UCWA on 365 is already long awaited, and still there's no official announcement about availability date.
A very good reason to choose UCWA instead of UCMA, also in case of server automation, is the much simpler deployment of UCWA (UCMA deployment is quite tough).
UCMA must run on a Windows Server OS which joins the S4B farm basically (thus sits in your DMZ)
UCWA can run on any device that 'speaks' HTTP. Your UCWA App can run, for instance, on a Raspberry Pi
I think this is a huge difference, for sure it is for your system administrator
Old thread, but in my experience, writing server-side code with UCMA is somewhat easier than trying to use UCWA - and all that UCWA really is is a UCMA application sitting on your Lync/S4B server with a REST wrapper.
For the fairly simple use-case you've described, you could write the service as a client-endpoint UCMA application, which avoids the rather irritating Lync/S4B topology changes and deployment headaches that Massimo alludes to for a TrustedApplication. In this configuration, you are essentially just a third-party client, and you provide the credentials to sign into Lync/S4B as a specified user. Under this scenario, the only requirements are that the server running your application needs to be joined to your domain, run a 64-bit Windows OS, and have the UCMA runtime installed.
Some sort of API support for Skype for Business on Office365 is badly needed. There was some promises of a UCMA-like SDK for Office 365, but it has been more than six months with no hints of an actual release.

Outlook macros processing before login in system

I have to process macros in Outlook. As I login to system; Outlook launches and the processing starts, but I need to do the processing irrespective of login to system. i.e when I switch on my PC before login the Outlook should process the macros.
I tried to put Outlook in startup, regedit, scheduled the task to run but didn't get success result.
Thanks in advance..
If there is no users logged to the system, what profile should be opened in Outlook?
i need to do the processing irrespective of login to system
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.
Read more about that in the Considerations for server-side Automation of Office article.

Cocoa Mac application using Microsoft Exchange Services 2007

Can anyone provide a suggestion on the best way to use Exchange Services 2007 in a Mac application using Cocoa? I need to access Inbox mail messages and their headers to parse the information I need.
I have written an implementation in my .NET application, but of course .NET provides some nice libraries to handle all the complex types and such.
Thanks in advance.
Cocoa doesn't really have any decent SOAP libraries available that I'm aware of. You could either try to access Exchange via IMAP if it's enabled for your server (e.g. with MailCore) or embed another language with better SOAP support (e.g. Java, Python). Here's an example of using Java/JAXWS to talk to EWS.
Microsoft has an EWS Java API but it was apparently so poor-quality that they pulled it. However, there's a link to the download on that page if you want to try it anyway, and it's open source so you could potentially fix any bugs you ran into.
Doc,
I came across this EWS OSX Widget in my search for the same thing. It would be good to know if this works for you.
http://ewsmacwidget.codeplex.com/releases/view/16559

Can we automate Application available under Citrix Program Neighbourhood?

I tried to automate an application available under Citrixl Program Neightbourhood using QTP 9.5, but QTP does not identify the objects inside the application. Can we automate citrix application using QTP?
What are different tools available to perform automation testing on Citrix applications?
I have used Scapa Technologies for Citrix ICA or Terminal Services testing. Scapa provides an automation tool that is installed on the Citrix server. Then it has a controller that launches the citrix session, communicates with the server and starts the automation tool which calls your automation script. It actually runs on the server so it can interact with the applications controls.
QTP supports Citrix only if it is installed on the Citrix machine, it doesn't support working via the client.
For technical reasons this is because QTP needs to be able to listen to windows messages and load its DLL's into some applications which it cannot do from a different machine.
Traditional tools generally do not work with applications running in remote desktop applications. The interfaces needed aren't available. Probably your only option is an image-based tool like Eggplant.
The difficulty with Citrix automation is that the applications are streamlined to the client computer as an image, thus you can not access to the UI tree of elements.
UiPath can automate very easy Citrix applications (also desktop or web) by using some image automation specific techniques like
clicking relative to an image
using OCR for text scraping
using keyboard hotkeys
click relative to a OCRed text
Here's a full tutorial showing different Citrix (or virtual desktops) automation techniques for
data entry
OCR data scraping
clicking and typing relative to an image or text
UiPath has an SDK that can be used from code.
The default will be to create visual automation (workflows) directly from UiPath Studio.
Note: I work at UiPath. You should also try other visual automation tools like Automation Anywhere, WinAutomation, QTP, Selenium, etc, use them side by side and choose the one that suits better your needs.
For what it's worth, I have automated a CITRIX application just as you described for a large telecommunications firm in the early 2000s. I did this by getting deep inside the Windows SendMessage APIs and an optical character recognition package. You would probably be astonished by how much data was moved from one system into another using my team's CITRIX/screen-scraping "robots." I came upon this question because I was reminiscing about this project and wondering if there was still a need for this type of solution in this day and age.
As Motti said You can't automate via Citrix client. In general Citrix client is hard to automate. I know that someone at my work played with it and he managed to catch some communication and objects that could be useful to automate tests via Citrix, but that would be separate development project to create such solution that could be very limited.
Via citrix QTP object recognition is totaaly different. QTP on remote machines works on objects based on location and reference so it is almost impossible to automate.
As per my experience this type of setup can be best handled using the Image recognition and/or OCR capable testing tools like eggplant but its not really suggested to have testing environment which includes Citrix. Another option could be to install an automation tool like AutoIT within the Citrix machine and trigger the scripts using the other tool (maybe Selenium but I am yet to try that out).

Desktop Based Application

What is a better platform/language for developing Windows/desktop based application that can run offline (sometimes)? .NET (C#, ASP) or Java or any other development tool? This application requires to store data into a database(involves some GIS) and later Synch both ways with the main server (SQL/Oracle) during off hours or when initiated by a user or event or when online? ALso the tool/IDE recommended should allow us in the future to migrate this desktop application as a Web based application to the corporate server with less pain or re-work when internet/nw access is available to all of our remote sites/users. Any input/advice is appreciated.
If you are strictly doing Windows desktop application development, C# or VB.NET would be an excellent choice. There is a ton of documentation out there for .NET developers. Although the framework is a free download from Microsoft, any serious work is cumbersome and tedious without the IDE.
If you needed the potential to support your application on multiple operating systems besides Microsoft Windows, then I think it might be worth looking into Java.
For web solutions, in .NET you have ASP.NET, Java you have JSP and Tomcat.
You could try Adobe AIR. It seems like it would serve most of your desktop needs and it should be the easiest to migrate into a web app (Flex).
C#/WPF for desktop with Silverlight, XBAP or even ASP as the online options.
Since you mentioned the desire to web-enable this application at some point I'd look into Silverlight. Out-of-browser capabilities were introduced in Silverlight 3. That means that the app can run directly on the desktop, and the internet connection is optional. However, when the internet connection is available it has built-in support for auto-updating itself.
And now in Silverlight 4 it's possible to run an out-of-browser Silverlight app with elevated trust. Silverlight 4 also finally introduced things like right-click support, clipboard access, full keyboard support in fullscreen mode, etc. So if you're just now starting development, I'd most definitely use version 4.
You'll have to communicate with something like a WCF service for a lot of the database operations. But going with Silverlight should allow you to build something that'll work on the desktop and the web alike without having to manage two systems.
Going web-based after you already developed a desktop application is a really bad idea. There is no reason the desktop application cannot use a internet connection, and be updated from a server.
You could try Delphi. It's a rapid application development tool. Very different, but very quick to use. Well suited to Oracle integration. Data sync is probably going to need to be custom, unless you're using something like Sybase SQL Anywhere.