Not covered functionality, feature requests, and questions should use the Feature Request or Question templates.
EasyRepro Version
[ ] Microsoft Dynamics 365 Online Version 8.2 (8.2.x) (DB 8.2.x) online
[ ] Microsoft Dynamics 365 Online Version 9.0 (9.0.x) (DB 9.0.x) online
[ ] Microsoft Dynamics 365 Online Version 9.0.2 (9.0.2) (DB 9.0.2) online
[x] Microsoft Dynamics 365 Online Version 9.1 (9.1.x) (DB 9.1.x) online
UCI or Classic Web
[x] UCI (XrmApp)
[ ] Classic Web (XrmBrowser)
Online or On Premise
[x] Online
[ ] On Premise
Browser
[x] Chrome
[ ] Firefox
[ ] IE
[ ] Edge
Describe the bug
C# code (Class WebClient in Microsoft.Dynamics365.UIAutomation.Api.UCI; Function "internal BrowserCommandResult SelectTab") cannot find element ".//ul[contains(@id, \"tablist\")]" on the Account form using following code line:
Code to reproduce
internal BrowserCommandResult SelectTab(string tabName, string subTabName = "", int thinkTime = Constants.DefaultThinkTime)
{
ThinkTime(thinkTime);
return this.Execute($"Select Tab", driver =>
{
IWebElement tabList;
if (driver.HasElement(By.XPath(AppElements.Xpath[AppReference.Dialogs.DialogContext])))
{
var dialogContainer = driver.FindElement(By.XPath(AppElements.Xpath[AppReference.Dialogs.DialogContext]));
// ERROR: ".//ul[contains(@id, \"tablist\")]" is not found on the Account form
tabList = dialogContainer.WaitUntilAvailable(By.XPath(AppElements.Xpath[AppReference.Entity.TabList]));
}
else
{
tabList = driver.WaitUntilAvailable(By.XPath(AppElements.Xpath[AppReference.Entity.TabList]));
}
ClickTab(tabList, AppElements.Xpath[AppReference.Entity.Tab], tabName);
//Click Sub Tab if provided
if (!String.IsNullOrEmpty(subTabName))
{
ClickTab(tabList, AppElements.Xpath[AppReference.Entity.SubTab], subTabName);
}
driver.WaitForTransaction();
return true;
});
}
Expected behavior
Following element should be found:
Firma
Firma
...
**Screenshots**
![Form Account](https://user-images.githubusercontent.com/60438234/191841783-7e267e02-a960-40da-b48f-8097f23c69ff.png)
**Additional context**
The code is trying to find an element using ".//ul[contains(@id, \"tablist\")]" BUT the correct syntax should be w/o leading fullstop "//ul[contains(@id, \"tablist\")]"
Bug Report
Issues should only be created for items related to covered functionality.
Not covered functionality, feature requests, and questions should use the Feature Request or Question templates.
EasyRepro Version
UCI or Classic Web
Online or On Premise
Browser
Describe the bug SelectTab") cannot find element ".//ul[contains(@id, \"tablist\")]" on the Account form using following code line:
C# code (Class WebClient in Microsoft.Dynamics365.UIAutomation.Api.UCI; Function "internal BrowserCommandResult
tabList = dialogContainer.WaitUntilAvailable(By.XPath(AppElements.Xpath[AppReference.Entity.TabList]));
dialogContainer is not null !!!
Special formatting / display
N/A
Code to reproduce SelectTab(string tabName, string subTabName = "", int thinkTime = Constants.DefaultThinkTime)
{
ThinkTime(thinkTime);
internal BrowserCommandResult
Expected behavior
Following element should be found: