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

[BUG] Sub-grid command is not found when it is in the overflow menu #980

Closed
4 tasks done
ewingjm opened this issue Sep 17, 2020 · 1 comment · Fixed by #987
Closed
4 tasks done

[BUG] Sub-grid command is not found when it is in the overflow menu #980

ewingjm opened this issue Sep 17, 2020 · 1 comment · Fixed by #987
Labels
Milestone

Comments

@ewingjm
Copy link
Contributor

ewingjm commented Sep 17, 2020

Bug Report

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

Describe the bug

When a sub-grid command is in the overflow menu, ClickSubGridCommand() is unable to find it.

Code to reproduce

XrmApp.Entity.SubGrid.ClickCommand(subGridName, commandName);

-->

Expected behaviour

The sub-grid overflow menu button should be clicked followed by the command in the overflow menu.

Screenshots

image

Attempting to click a command other than the three shown will result in the exception:

No command with the name '' exists inside of '' CommandBar.

Additional context

I believe the following code to be the issue -

//Is the button in More Commands Overflow?
if (items.Any(x => x.GetAttribute("aria-label").Equals("More Commands", StringComparison.OrdinalIgnoreCase)))
{
    //Click More Commands
    items.FirstOrDefault(x => x.GetAttribute("aria-label").Equals("More Commands", StringComparison.OrdinalIgnoreCase)).Click(true);
    driver.WaitForTransaction();
...

When I inspected the HTML for the sub-grid, the aria-label attribute value was More commands for <entity display name> rather than More Commands. Perhaps More Commands is for a control that isn't a standard read-only grid? I would suggest changing this to a StartsWith check to avoid a breaking change.

@ewingjm ewingjm added the bug label Sep 17, 2020
@TYLEROL TYLEROL linked a pull request Sep 20, 2020 that will close this issue
12 tasks
@TYLEROL TYLEROL added this to the 9.1.0.23435 milestone Sep 20, 2020
@TYLEROL
Copy link
Member

TYLEROL commented Sep 20, 2020

@ewingjm - This has been fixed in the develop branch. It should be merged into release branch tomorrow as well as a NuGet update.

Thanks,
Tyler

@TYLEROL TYLEROL closed this as completed Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants