5

We develop office-js based addin for Excel and we've come to a place where we want to write automated functional tests (preferably with Selenium) for desktop version of Excel on Windows.

First issue we've encountered was that different combinations of Excel/Windows use either IE/Edge's webview underneath. Let's let IE die and assume we just need to test with Edge webview (EdgeHTML, as Edge-chromium webview is not yet released).

So the main issue is: we cannot (or don't know how to) connect addin's webview with Selenium, because we're not responsible for launching webview's process - it's launched by Excel itself. Is there any recommended way to run functional tests for desktop version of Excel with addin inside? We can control Excel itself through COM, so that's not an issue. But how to control the webview underneath addin?

We've tried WinAppDriver, but it gives windows-specific XML of generated window, not addin's HTML we'd like to see, making navigation and assertions fragile and complicated.

I think we searched just everywhere and couldn't find any pretty solution, so dirty hacks are also allowed, as long as they will work reliably and not too slow.

mich
  • 96
  • 3
  • I'm hoping to do this kind of testing but assumed automation with an actual office app client would be impossible. So the current plan is to run automated browser testing against a build of the addin web app that has all of the officejs functions that we use mocked. It may be possible to run these kinds of tests against the Office web app that works with your addin. – markdon Jul 09 '20 at 07:11
  • I know there's an option to run tests with addin running with Excel Online. But our users aren't using Excel Online and in fact Excel for desktop and Excel Online are very different applications with their own quirks... So it doesn't make sense to test addin integration with something client's aren't using. And even if we'd like to run tests on Excel Online - it's impossible to easily click/fill/assert on Excel Online's cells, because they're rendered as a single canvas, so no divs for Selenium. – mich Jul 10 '20 at 08:19

0 Answers0