WinAppDriver - 1.1
Microsoft Word 2016
We are developing build in plugin in Office Word 2016.
During version 1803 of Word we had no issues locating elements.
After upgrade to version 1808 - WinAppdriver cannot locate elements.
We had to downgrade but it is very crucial for us to have Word up-to-date.
Attaching an example of simple table prepared by devs in which WinAppDriver cannot locate elements.
Invisible content controls.docx
Hi @mlehinchenko,
Can you provide the following information:
What version of Windows?
What does Inspect.exe show up?
Can you try providing a pagesource file for us to see?
Does this issue persist on Word 1809?
Lastly, what attributes (AutomationID, XPath) are you using to identify the elements?
Thanks
Similarly, I'm also unable to use XPath to find elements in Outlook. By AutomationId/Name do work.
WinAppDriver - 1.1
Outlook For Office 365 MSO (16.0.11231.20164) 64-bit
Win 10 Enterprise 1803 (17134.590)
I tried Session.FindElementByXpath("/") or "/*" to try and get any element. No results.
Session.PageSource returns XML that matches with Inspect.exe
Also, I've tried by creating the Session with "app"="Root" for a DesktopSession and with "appTopLevelWindow" assigned to MainWindowHandle.ToString("X") after Outlook has opened past it's splash screen.
I tried running WinAppDriver directly from command prompt: winappdriver 127.0.0.1 4723/wd/hub
with admin privs and without.
Any thoughts for me to try?
@jgilpin.
There is an active issue around Microsoft Outlook having multiple elements sharing runtimeId that WinAppDriver wasn't expecting. We are currently working on a fix that may alleviate your issue. Please stay tune.
Hi @jgilpin, @mlehinchenko,
WinAppDriver v1.1.1 release properly handles the exception scenario where distinct elements share the same runtimeId. This issue prematurely terminate XPath element search in previous releases. Can you please give it a try to see if this fix the issue you encountered?
@timotiusmargo Will give it a try and let you know. thanks for your efforts.
@timotiusmargo Will check out 1.1.1 today!
@timotiusmargo no luck
1808 word and WinApp 1.1.1
elements not found
Maybe I need to provide something else to help resolving it?
@timotiusmargo 1.1.1 and desktopSession.FindElementByXPath() work for me in Outlook for Office 365 16.0.11328.20140 64-bit.
For others, my desktopSession is instantiated with Appium.Dotnet like this:
protected const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723/wd/hub";...
var appCapabilities = new OpenQA.Selenium.Appium.AppiumOptions();
appCapabilities.AddAdditionalCapability("app", "Root");
appCapabilities.AddAdditionalCapability("deviceName", "WindowsPC");
appCapabilities.AddAdditionalCapability("platformName", "Windows");
desktopSession = new WindowsDriver<WindowsElement>(new Uri(WindowsApplicationDriverUrl), appCapabilities);
@timotiusmargo hi once again, seems like my bad and it is working. Had to change a little bit strategy of searching but in the end everything seems to be OK. Thanks for help.
@timotiusmargo Should I close the issue or it will be auto-closed?
Thanks for the update @mlehinchenko! I'm glad the WinAppDriver v1.1.1 release successfully addressed the issue.