msal-browser 2.0, PC platform and logging in/token acquisition - office-addins

I read through the docs and it seems to suggest that we need to run msal login via an async dialog because for office on the web, the taskpane starting point is not the topmost window.
However, on the PC platformtype, I think the taskpane is toplevel.
Does that mean that on the PC platform, I should be able to run a redirect dialog without issues directly in the taskpane itself?
I'm trying to use msal-browser (msal 2.0) but I keep getting the taskpane popping up a whole new browser tab outside the outlook desktop app and it breaks the login process. I'm not sure I'm doing it right though.
Does anyone have an example of running a redirect login process inside the taskpane itself for the PC platformtype using msal 2.0?

I did get this to work Ok. The new msal-browser 2.0 works fine and is probably more predictable than the 1.x series.

Related

Winappdriver and selenium in the same automated test

Hi I could do with some help / more experienced eyes.
I have a WPF application which I have started automating some UI tests for using winappdriver, upon further investigation it has embeded html in it - webview, and can fire off requests to open the default browser with app related content - such as help files.
Has anyone had experience in working with this? For example:
open the WPF app,
click on help button on the WPF app which will open a browser and
then continue the test to ensure that the correct help page has been launched with the correct content in relation to the WPF page it was fired from.
Presumably this can be done in my case with chrome driver (winappdriver cannot see the content on the webpage). I have tried using selenium's window handles, but it's like the driver can't see the already open browser page. So I am at a bit of a loss and really not sure what to do.
In previous roles I was used to using Ranorex, which does both windows and web based UI automation. So I have never had any experience using multiple driver types to do the one test.

XML5632: Only one root element is allowed - Microsoft Add-In

I'm currently working on an issue with a Microsoft Edge Add-In written in React in which state changes aren't working, and I can't see any of my console logs.
Some context:
I have a web Add-In for Microsoft Outlook desktop that I am trying to run on Windows 10 version 1903. I've added console logs to the event handlers of a few button clicks and several other events throughout the app, but none of these console logs actually show up in the Microsoft Edge DevTools console. I can see calls to console.log('We just clicked a button') in the compiled JavaScript file in the Debugger, so my changes are being picked up and are in fact there, but no actual console logs show up inside of the DevTools console. The only error I see in DevTools is XML5632: Only one root element is allowed on index.html (1, 1).
I should note that the web Add-In works in Microsoft Outlook desktop on later versions of Windows 10, but running it on version 1903 is the only time that it's problematic.
An answer on this forum: https://www.outsystems.com/forums/discussion/20753/xml5632-only-one-root-element-is-allowed-error-on-windows-edge/#Post88600 suggests it's a problem with Edge interpreting an Ajax call as XML, but doesn't elaborate much more beyond that.
My guess is that this a JavaScript issue with pre-Chromium Edge, but I'd like to know if anyone has any suggestions on a workaround or fix so that I can 1.) Resolve the issue with the state change in my React app and 2.) See my console logs.

reCAPTCHA v2 with wpf webbrowser / frame control

reCAPTCHA has limitation on browser supports however it works on IE without adding any value in compatibility mode. I have been trying multiple things with WPF application which is displaying a webpage hosted inside a Frame (or Web Browser) control. That webpage has Google reCAPTCHA V2 (I'm not a robot). It works fine in all the browsers but inside WPF app it fails to display properly.
Based on following link we need to have specific browser support
https://support.google.com/recaptcha#6262736
I also made sure javascripts are enabled and working fine. Any suggestion?
I ran into this issue as well and the only thing I know how to make it work is go into the recaptcha admin console and slide the security preference to the easiest so the webBrowser control can do the image verification at the very least
Update:
Found out basically because the web browser control is IE 7 by default
Use latest version of Internet Explorer in the webbrowser control

Is it possible to open a web page from a Cortana background app?

Cortana background apps provide deep linking capabilities, which allow the developer to link to a specific page within her app. I'm wondering if it's possible to open a different application instead, for example a web browser.
My current work-around is to deep-link into my app, and then call Windows.System.Launcher.launchUriAsync as soon as my app is launched. However, this means that the app opens along of the web browser. I would like it to not open at all! Is that possible?
From the MSDN page for LaunchUriAsync:
Unless you are calling this API from a Classic Windows application, this API must be called from within an ASTA thread (also known as a UI thread).
Unfortunately, Cortana's background task is not a UI thread. You're running as a background task, and communicating to Cortana's UI via a set of APIs provided for that purpose, which are limited by design.
Anything you try to do that requires you to be in the UI thread is going to fail for the same reason. You could try hosting the web control in your app however to remove the chain-launched browser from the equation.

Win 8.1 Universal app - App Exit on Fast App Switching

I am developing an app for Windows Universal 8.1, facing an issue where the App gets Exit on going background. The scenarios are as follows
When the app goes background on clicking Windows key(FAS), the app get exit.
When I launch Share Task i.e Data Transfer Manager Interface, after completing the share operation the app exit.
Works fine in Debug mode but issue found after deploying to the device.
PS : I am using the Navigation Service Interface to navigate to pages using MVVM and navigating from viewmodels.
Please help if its known issue, if not help to rectify this.
Thanks in advance.
Sounds like your App crashes in The Suspending Event. As apps in Debug mode are not suspended, you are unlikely to see that happen.
You can manually fire the event from Visual Studio when debugging: It is in the debugging toolbar under Application Lifecycle Events.
Most common error in this case: Using complex objects as navigation parameters, which cannot be serialized.

Resources