microsoft / EasyRepro

Automated UI testing API for Dynamics 365
MIT License
513 stars 286 forks source link

Can't open record on Grid #1283

Open szmeki opened 2 years ago

szmeki commented 2 years ago

I am not able to open a record with the xrmApp.Grid.OpenRecord(0). xrmApp.Grid.SwitchView() doesn't work either. However xrmApp.Grid.Search() works fine.

Code:

    [TestMethod]
    public void UCITestEset()
    {
        var client = new WebClient(TestSettings.Options);
        using (var xrmApp = new XrmApp(client))
        {
            xrmApp.OnlineLogin.Login(_xrmUri, _username, _password, _mfaSecretKey);

            xrmApp.Navigation.OpenApp(UCIAppName.FieldService);

            xrmApp.Navigation.OpenSubArea("FieldService", "Partnerek");

            xrmApp.Grid.Search("test");

            xrmApp.Grid.OpenRecord(0);

        }

    }

Error message:

Test method Microsoft.Dynamics365.UIAutomation.Sample.UCI.GetValueUci.UCITestEset threw exception: System.ArgumentNullException: input cannot be null

Standard output:

Parameter name: inputBrowserAutomation Information: 9000 : BrowserInitialized invoked. BrowserAutomation Information: 9001 : BrowserInitialized completed. BrowserAutomation Information: 10001 : Command Start: Login - Attempt 1/5 BrowserAutomation Information: 10002 : Command Success: Login - 1 attempts - total execution time 23426,8138ms - Return Result: Success BrowserAutomation Information: 10001 : Command Start: Initialize Unified Interface Modes - Attempt 1/5 BrowserAutomation Information: 10002 : Command Success: Initialize Unified Interface Modes - 1 attempts - total execution time 11468,5104ms - Return Result: True BrowserAutomation Information: 10001 : Command Start: Open App Field Service - Attempt 1/5 BrowserAutomation Information: 10001 : Command Start: Initialize Unified Interface Modes - Attempt 1/5 BrowserAutomation Information: 10002 : Command Success: Initialize Unified Interface Modes - 1 attempts - total execution time 9516,0834ms - Return Result: True BrowserAutomation Information: 10002 : Command Success: Open App Field Service - 1 attempts - total execution time 10165,3609ms - Return Result: True BrowserAutomation Information: 10001 : Command Start: Open Sub Area - Attempt 1/5 BrowserAutomation Information: 10002 : Command Success: Open Sub Area - 1 attempts - total execution time 3974,0459ms - Return Result: True BrowserAutomation Information: 10001 : Command Start: Search - Attempt 1/5 BrowserAutomation Information: 10002 : Command Success: Search - 1 attempts - total execution time 228,3426ms - Return Result: True BrowserAutomation Information: 10001 : Command Start: Open Grid Record - Attempt 1/5 BrowserAutomation Information: 10004 : Command Retry: Open Grid Record - System.ArgumentNullException: input cannot be null Parameter name: input - Retry 2/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open Grid Record - System.ArgumentNullException: input cannot be null Parameter name: input - Retry 3/5 initiated BrowserAutomation Information: 10003 : Command Failure: Open Grid Record - 3 attempts - total execution time 100202,5099ms - Return Result: System.ArgumentNullException: input cannot be null Parameter name: input at: OpenQA.Selenium.Support.UI.DefaultWait1..ctor(T input, IClock clock) at: OpenQA.Selenium.Support.UI.DefaultWait1..ctor(T input) at: Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.WaitUntil(ISearchContext driver, Func2 searchFunc, Nullable1 timeout, Action1 successCallback, Action failureCallback) hely: C:\Users\Miki\Downloads\EasyRepro-develop\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs, sor: 559 at: Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.WaitUntilClickable(ISearchContext driver, By by, Nullable1 timeout, Action1 successCallback, Action failureCallback) hely: C:\Users\Miki\Downloads\EasyRepro-develop\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs, sor: 527 at: Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.WaitUntilClickable(ISearchContext driver, By by, Nullable1 timeout, Action1 successCallback, String exceptionMessage) hely: C:\Users\Miki\Downloads\EasyRepro-develop\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs, sor: 519 at: Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.WaitUntilClickable(ISearchContext driver, By by, Action1 successCallback, String exceptionMessage) hely: C:\Users\Miki\Downloads\EasyRepro-develop\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs, sor: 510 at: Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.<>c__DisplayClass75_0.b__0(IWebDriver driver) hely: C:\Users\Miki\Downloads\EasyRepro-develop\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs, sor: 1537 at: Microsoft.Dynamics365.UIAutomation.Browser.DelegateBrowserCommand1.ExecuteCommand(IWebDriver driver, Object[] params) hely: C:\Users\Miki\Downloads\EasyRepro-develop\Microsoft.Dynamics365.UIAutomation.Browser\DelegateBrowserCommand.cs, sor: 28 at: Microsoft.Dynamics365.UIAutomation.Browser.BrowserCommand1.Execute[T1,T2,T3,T4,T5,T6,T7,T8,T9](IWebDriver driver, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7, T8 p8, T9 p9) hely: C:\Users\Miki\Downloads\EasyRepro-develop\Microsoft.Dynamics365.UIAutomation.Browser\BrowserCommand.cs, sor: 103 BrowserAutomation Information: 9000 : BrowserDisposing invoked. BrowserAutomation Information: 9001 : BrowserDisposing completed.

Fun-2-work commented 2 years ago

Hi @szmeki,

did you found an answer to the problem? I am facing this problem too.

MasemolaCol commented 1 year ago

I am also experiencing the same issue. How do I resolve this error?

tipsey commented 1 year ago

I am also experiencing the same issue. How do I resolve this error?

See this thread [(https://github.com/microsoft/EasyRepro/issues/1216)]