How can we host a taskpane.html in a local dev server? As I know, office.js does not allow it to be loaded outside the office app - powerpoint

I do hope I can load the taskpane.html outside the office app, which is for powerpoint add-ins actually. Because I need to run automation test. As I know, the office.js does not allow users to use it outside the office app. What should I do? Please.

The taskpane.html can load in an ordinary browser, but you will get an error saying that Office.js cannot initialize. You can click buttons and other UI in the taskpane, but nothing that requires Office.js will work. If it is unit tests that you want to automate, you can do that with the mocking framework. See Office Add-ins Unit Testing.

Have you try to run the automation test using PowerPoint on the Web (Office 365)?

Related

Ways to automate Outlook Application

After every patching we test basic Outlook functionality like able to send email etc, wanted to check if there is any way to automate the Outlook UI.
You can use Microsoft Active Accessibility or any wrapper around that API with Selenium for getting the job done.

Can I use the Office Add-ins platform to automate Outlook?

I'm using the Windows desktop version of Outlook 365. I very frequently create a new Outlook 'task' and add the exact same text (with formatting) to the description section. I would like to automate this, so that all this is done with a single keystroke (or maybe mouse click). Can this be done with the Office Add-ins platform? I am a web developer, so using JavaScript is appealing.
If not, how might I approach this? I've tried VBA but the process was a bit difficult, which is why I'm hoping I can use a JavaScript approach.
Thanks in advance.
Addin is an overkill - it will need to be installed in your Exchange tenant or sideloaded.
VBA is not at all difficult if you already know JS.

Outlook add-in with global scope (inbox level)

Is there a way to have an outlook add-in that uses a global scope? I want to be able to launch the add-in at any time, but not necessarily relate it to a specific e-mail. According to the documentation I found, the closest thing would be to have it appear as a Module, but then it only works on the desktop version (not the web), and doesn't allow you to view it alongside e-mails. It would be ideal if this could run on the side of the screen, similar to how Skype works on the web version of Outlook, on both the desktop and web versions. Is Skype a special case, or is it possible to build an add-in like that?
Web-based add-ins work in the context of the current item only.
Instead, you may consider developing a browser plug-in which modifies a web page dynamically. And for the desktop editions of Outlook you may consider creating a COM based add-in which allows to customize the UI in the way you need. See Walkthrough: Creating Your First VSTO Add-In for Outlook to get started quickly.

Is Office.context.ui.messageParent broken in Outlook 2016 for Mac?

I'm working on an Outlook addin using the new Office-JS apis, and in building out the authentication flow, I've found that in the Outlook 2016 for Mac case, the dialog system seems to not work properly.
To be clear, we're using the Office Insider Fast Track build as it has much improved support for the Office-JS API.
I've been through several iterations of this particular piece (most of which worked fine both in the Windows client and the web client on Mac and Win), and have had no luck. The scenario is:
List item
Open up the task pane in outlook.
Hit the sign in button
A new window opens, pointed at our authentication portal
User signs in.
On auth completion, the window redirects to a page in the office add-in scope, and calls back to the parent frame with the auth token, where it can be further processed.
Steps 1 through 5 work fine on all platforms. Step 6 refuses to work on Outlook for Mac. Initially, this flow was built using the native js window.open and window.postMessage apis. As mentioned above, this worked everywhere but Outlook Mac, where, the API seemed to ignore the window options and just open the url in a new tab in whatever browser was open and never setting the child window reference (result of window.open being null).
Failing this, I followed the advice found here on SO to use the Office functionality, displayDialogAsync and messageParent. After some initial hurdles, this too was setup and working on every platform save Outlook Mac.
As there is no dev tools or JS console support in Mac Outlook, I followed the advice found here Howto: Outlook 2016 for Mac - Debugging/View Console Logs in Outlook Add-in and setup Vorlon to attempt to get some context, adding numerous logging points to try and get some context. Unfortunately, while Vorlon does pick up my auth landing page as a client, and sees the Office interfaces, none of my console outputs are presented, making it seem as though the JS isn't running at all.
At this point I'm not sure what to try next. Has anyone run into this issue, or gotten this to work on the Outlook 2016 for Mac client?
Clarifying context:
All auth pages are listed in the AppDomains section of the Manifest.
While initial versions pointed directly at our auth service (this worked on not Mac), the current version first opens up an in scope pre-auth page that redirects to the auth service.
The Office-JS api's block alerts, preventing their use in displaying useful information.
Authentication through all versions of this app have worked on both Outlook 2016 on Windows and OWA on both Win and Mac.
Thank you.
This issue in Outlook Mac has been fixed a few months ago. If anyone still encounters this issue with a recent Outlook Mac build, please reply with the build number.
The Office.context.ui is undefined in v16.17 (180909) build of Outlook for Mac 2016 using the following OfficeJS dist:
https://appsforoffice.microsoft.com/lib/1/hosted/office.js

UI Automation tools for windows (web page embedded in a windows app)

We have a webpage(html) embedded inside an outlook addin. We have tried to automate UI testing using AutoIt and MS UI Automation framework in the past with the help of redemption to open/close outlook etc.. But we are having a problem accessing the elements inside the webpage within the addin (we are able to access Windows elements).
Does anybody know any automation tool/framework that can help us?
Give Sikuli a try. Start with the tutorials.
I can't think of any other solution, as you're working in a very custom situation.

Resources