Hello,
I am working on automating Word Add-ins testing using Katalon Studio. My test case scenario involves two key components:
- Automating Ribbon Buttons: These are standard Windows elements, which I am able to automate successfully using Katalon’s Windows automation features.
- Automating WebView2 Elements in the Task Pane: The task pane of the add-in contains a WebView2 browser with web elements that I need to interact with.
Challenges:
- Element Capture Delay: Capturing WebView2 elements using the Spy Web or Recorder takes a significant amount of time.
- Element Identification Issues:
* Some WebView2 elements lack the Name property and instead rely on the Title
property.
* These elements do not get captured correctly or dynamically identified, even when
using locators like XPath with @title (e.g. //*[contains(@title, ‘value’)]). - Interaction Failures: Methods like WebUI.click() or WebUI.verifyElementPresent() fail to interact with the WebView2 elements, despite dynamic locators.
Questions:
- How can I reliably locate and interact with WebView2 elements using the Title property?
- Are there specific settings or capabilities I need to enable in Katalon Studio for better WebView2 support?
- Is there a way to switch context between Windows automation and WebView2 elements?
Any guidance for handling this combination of Windows and WebView2 elements would be highly appreciated.
Thank you.