microsoft / EasyRepro

Automated UI testing API for Dynamics 365
MIT License
521 stars 288 forks source link

Not able to click on the 3 dot button >convert to > to lead #1285

Open aniramibanerjee opened 2 years ago

aniramibanerjee commented 2 years ago

Not able to click on the 3 dot button >convert to > to lead

tried with taking all 3 xpath and storing in element refrence and tried calling the same with clickcommand its not working .. Xpath - {"Convert To", "//[@id='tablist_2']" }, {"threedot", "//[@id='OverflowButton_button2$button']" }, {"tolead", "//*[@id='OverflowButton_button2$button']/span/span[1]/span]" }

Code -

            xrmApp.CommandBar.ClickCommand("Email");

            xrmApp.ThinkTime(3000);
            xrmApp.CommandBar.ClickCommand("Save");
            xrmApp.ThinkTime(3000);
            xrmApp.CommandBar.ClickCommand("threedot", "Convert To", "To Lead");
            xrmApp.ThinkTime(3000);

Please let me know who to fix this issue .

aniramibanerjee commented 2 years ago

any update on this ?

IvanRastamanov commented 1 year ago

Hey @aniramibanerjee , Change your code to xrmApp.CommandBar.ClickCommand("Convert To", "To Lead"); System searches for the first argument in the command bar, if not found, it begins to search in "More Commands" - it is exactly in the list which appears after clicking the three dots buttons - and if found there, click on it. But pay attention to settings - I changed data in dictionary, because current is obsolete, and after change it founds: //{ "Related_CommandBarOverflowButton", ".//button[contains(@data-id, 'OverflowButton') and contains(@data-lp-id, 'Grid')]"}, { "Related_CommandBarOverflowButton", ".//button[contains(@data-id, 'OverflowButton')]"},