-
Notifications
You must be signed in to change notification settings - Fork 291
Description
Bug Report
Quick Create Form issue
Softwares version
- Tested on Visual Studio 2019 and 2017
- Dynamics365.UIAutomation.Api 9.1.0.6210
- Selenium.WebDriver 3.141.0
- Selenium.WebDriver.ChromeDriver 78.0.3904.10500
- Selenium.Firefox.WebDriver 0.26.0
EasyRepro Version
- Microsoft Dynamics 365 Online Version 9.1 (9.1.x) (DB 9.1.x) online
UCI or Classic Web
- UCI (XrmApp)
Online or On Premise
- Online
Browser
- Chrome
- Firefox
Describe the bug
Quick Create form wouldn't work for the setup using 3 points below:
- You have a quick create form for an Entity that has a self referential relationship with itself.
- You added a Tab on the main entity form to have a subgrid listing child records of the same entity type. This means that you also have a similar Tab (out of the box) that would be created when you create the relationship. Both of these Tabs would have the same subgrid displaying the related child records of the current parent entity record. The only difference is the ability to switch view using the out of the box Tab thats placed under "Related" Tab. The purpose of creating your own Tab is to make the Tab visible when viewing the parent Entity record. Its also to do with controlling the subgrid listing.
- You build an automated test that navigate to the parent Entity and then open the custom Tab that you created which has the subgrid listing child Entity records. Then click on "+ New..." button on the subgrid menu to bring up the quick create form. Then you try to set the form values but it would failed saying "element not interactable".
Special formatting / display
Code to reproduce
xrmApp.OnlineLogin.Login(_xrmUri, _username, _password);
xrmApp.Navigation.OpenApp(UCIAppName.KnowledgeAdmin);
xrmApp.ThinkTime(500);
xrmApp.Navigation.OpenSubArea("Assessments", "Assessments");
xrmApp.ThinkTime(500);
xrmApp.Grid.Search("Test Assessment One");
xrmApp.ThinkTime(500);
xrmApp.Grid.OpenRecord(0);
xrmApp.ThinkTime(500);
xrmApp.Entity.SelectTab("Child Assessments");
//xrmApp.Entity.SelectTab("Related", "Knowledge Assessments");
xrmApp.ThinkTime(500);
client.Browser.Driver.FindElement(By.XPath("//button[@aria-label='New Knowledge Assessment']")).Click();
xrmApp.ThinkTime(1000);
xrmApp.Entity.SetValue("cr6bb_title", "Child Assessment QuickCreate");
//xrmApp.QuickCreate.SetValue("cr6bb_title", "[Automation] Child Assessment QuickCreate");
xrmApp.ThinkTime(500);
xrmApp.QuickCreate.Save();
Expected behavior
I should be able to set the fields on Quick Create form.
Screenshots
Screenshot1: I'm using an entity call "Knowledge Assessment" and below is the 1:N Relationship setup representing the self referential relationship:

Screenshot2: After enabling Quick Create on the entity by selecting the related checkbox. Edit the main form of the entity to add a custom Tab (I'm using "Child Assessments" in this case) for listing child entity records. You can choose to remove "Knowledge Assessment" from Navigation panel under "Common" section. That would remove the out of the box Tab sitting under "Related" Tab. But that doesn't solve our problem.

Screenshot3: Showing Child Assessments Tab subgrid with "+ New Knowledge Assessment" button:

Screenshot4: quick create window after clicking on subgrid button:

Additional context
Note: I didn't have issue interacting with Quick Create form for Referential Relationship between 2 different Entities. Its only when an Entity having Referential Relationship to itself.
If we didn't create the custom Tab and interact with Quick Create form through the subgrid from the out-of-the-box Tab sitting under "Related" Tab then we wouldn't have a problem because quick create form would work in this case.