Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium Unable to Interact with Taskpane Elements in Outlook Add-in #5264

Open
Shivneel-Prksh opened this issue Jan 12, 2025 · 2 comments
Open
Assignees
Labels
Area: Outlook Issue related to Outlook add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info

Comments

@Shivneel-Prksh
Copy link

I'm using Selenium and Chrome WebDriver to automate UI testing for a taskpane-based Outlook add-in. While Selenium can interact with the main Outlook web app, it fails to locate or interact with elements inside the taskpane when opened. This issue prevents me from retrieving element properties (e.g., textContent, innerHTML) and running automated UI tests.

Expected Behavior

When using Selenium to automate UI testing for a taskpane-based Outlook add-in, I expect to:

  • Open the Outlook web app.
  • Launch the taskpane add-in.
  • Use JavaScript through Selenium to locate elements in the taskpane and retrieve their properties (e.g., textContent, innerHTML).

Current Behavior

Selenium is able to:

  • Launch the Outlook web app.
  • Navigate and interact with elements outside the taskpane. However:
  • When the taskpane is opened, Selenium is unable to locate or interact with the elements inside it using JavaScript.
  • Attempts to retrieve properties like textContent and innerHTML of taskpane elements fail or return null/undefined.

Steps to Reproduce

  1. Launch the Outlook web app using Selenium and Chrome WebDriver.
  2. Open the taskpane-based add-in.
  3. Use Selenium to execute JavaScript to locate elements in the taskpane iframe and retrieve their properties.
  4. Observe that element interactions or property retrieval do not work.

Context

This issue blocks automation of UI testing for the taskpane-based Outlook add-in, making it challenging to verify element properties and run UI automated tests. The inability to interact with taskpane elements via JavaScript affects:

  • UI validation during testing.

Your Environment

  • Platform: PC Desktop
  • Host: Outlook Web (OWA)
  • Office Version Number: N/A
  • Operating System: Windows 11
  • Browser: Chrome (latest stable version)
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Jan 12, 2025
@exextoc exextoc added Needs: attention 👋 Waiting on Microsoft to provide feedback Area: Outlook Issue related to Outlook add-ins and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Jan 12, 2025
@exextoc exextoc self-assigned this Jan 12, 2025
@megharai1302
Copy link
Collaborator

Thanks @Shivneel-Prksh for reporting & sharing the details. Could you please provide the following details to help us investigate further:

  1. Does this not work for your add-in or any taskpane add-in?
  2. Is this something that has worked before?

@megharai1302 megharai1302 added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Jan 17, 2025
@Shivnil
Copy link

Shivnil commented Jan 19, 2025

Hi @megharai1302,

Thank you for your questions!

  1. This issue occurs with all taskpane add-ins, not just this specific one. None of the taskpane content can be accessed using Selenium.
  2. In the previous version of this add-in, we used dialogs to display prompts. Initially, we faced the same issue with accessing dialog content, but when we set displayInIframe property to false, we were able to access the content and execute JavaScript scripts.

It seems like the iframe-based rendering is the root cause of these access issues, but I’d appreciate any guidance or workarounds for this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Outlook Issue related to Outlook add-ins Needs: author feedback Waiting for author (creator) of Issue to provide more info
Projects
None yet
Development

No branches or pull requests

4 participants