microsoft / EasyRepro

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

[BUG] xrmApp.Grid.SwitchView("ViewName") not working in other language #1264

Open tipsey opened 2 years ago

tipsey commented 2 years ago

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

  1. Switch CRM language interface to French
  2. Open App and run a xrmApp.Grid.SwitchView("SitesExample")

Special formatting / display
None

Code to reproduce

//TODO Switch to Site Profile Not working in French xrmApp.Grid.SwitchView("Sites");

Expected behavior
Switches to Sites View in French but it keeps opening the views dropdown and keeps looking for the word "Sites" Note inserted code into clean github develop-2021/ReleaseWave2 version to isolate just code to confirm.

Screenshots
image

Additional context
Works when interface is in English 2021 release wave 2 enabled Server version: 9.2.22012.00133 Client version: 1.4.3727-2201.2

EasyRepro: develop-2021/ReleaseWave2

//TODO Switch to Site Profile Not working in French but works in English xrmApp.Grid.SwitchView("Sites");

OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99)

Stack Trace: 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) line 138 BrowserCommand1.Execute(IWebDriver driver) line 35 BrowserPage.Execute[TResult](BrowserCommandOptions options, Func`2 delegate) line 182 WebClient.SwitchView(String viewName, String subViewName, Int32 thinkTime) line 1507 Grid.SwitchView(String viewName, String subViewName) line 30 Accounts.TC157780FR() line 61

Standard Output: BrowserAutomation 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 11725.6819ms - 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 14918.2566ms - Return Result: True BrowserAutomation Information: 10001 : Command Start: Open App TDG Inspections / Inspections TMD - 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 20237.8955ms - Return Result: True BrowserAutomation Information: 10002 : Command Success: Open App TDG Inspections / Inspections TMD - 1 attempts - total execution time 21019.8644ms - Return Result: True BrowserAutomation Information: 10001 : Command Start: Open Unified Interface Sub-Area - Attempt 1/5 BrowserAutomation Information: 10002 : Command Success: Open Unified Interface Sub-Area - 1 attempts - total execution time 5201.5685ms - Return Result: True BrowserAutomation Information: 10001 : Command Start: Switch View - Attempt 1/5 BrowserAutomation Information: 10001 : Command Start: Open View Picker - Attempt 1/5 BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 2/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 3/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 4/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 5/5 initiated BrowserAutomation Information: 10003 : Command Failure: Open View Picker - 5 attempts - total execution time 20645.1008ms - Return Result: OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) at OpenQA.Selenium.WebDriver.FindElement(String mechanism, String value) at OpenQA.Selenium.By.<.ctor>b__11_0(ISearchContext context) at OpenQA.Selenium.By.FindElement(ISearchContext context) at OpenQA.Selenium.WebDriver.FindElement(By by) at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.<>c.<OpenViewPicker>b__74_0(IWebDriver driver) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs:line 1480 at Microsoft.Dynamics365.UIAutomation.Browser.DelegateBrowserCommand1.ExecuteCommand(IWebDriver driver, Object[] params) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\DelegateBrowserCommand.cs:line 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) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\BrowserCommand.cs:line 103 BrowserAutomation Information: 10004 : Command Retry: Switch View - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 2/5 initiated BrowserAutomation Information: 10001 : Command Start: Open View Picker - Attempt 1/5 BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 2/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 3/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 4/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 5/5 initiated BrowserAutomation Information: 10003 : Command Failure: Open View Picker - 5 attempts - total execution time 20423.1605ms - Return Result: OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) at OpenQA.Selenium.WebDriver.FindElement(String mechanism, String value) at OpenQA.Selenium.By.<.ctor>b11_0(ISearchContext context) at OpenQA.Selenium.By.FindElement(ISearchContext context) at OpenQA.Selenium.WebDriver.FindElement(By by) at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.<>c.b__74_0(IWebDriver driver) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs:line 1480 at Microsoft.Dynamics365.UIAutomation.Browser.DelegateBrowserCommand1.ExecuteCommand(IWebDriver driver, Object[] params) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\DelegateBrowserCommand.cs:line 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) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\BrowserCommand.cs:line 103 BrowserAutomation Information: 10004 : Command Retry: Switch View - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 3/5 initiated BrowserAutomation Information: 10001 : Command Start: Open View Picker - Attempt 1/5 BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 2/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 3/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 4/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 5/5 initiated BrowserAutomation Information: 10003 : Command Failure: Open View Picker - 5 attempts - total execution time 20490.6182ms - Return Result: OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.WebDriver.FindElement(String mechanism, String value) at OpenQA.Selenium.By.<.ctor>b11_0(ISearchContext context) at OpenQA.Selenium.By.FindElement(ISearchContext context) at OpenQA.Selenium.WebDriver.FindElement(By by) at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.<>c.b74_0(IWebDriver driver) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs:line 1480 at Microsoft.Dynamics365.UIAutomation.Browser.DelegateBrowserCommand1.ExecuteCommand(IWebDriver driver, Object[] params) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\DelegateBrowserCommand.cs:line 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) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\BrowserCommand.cs:line 103 BrowserAutomation Information: 10004 : Command Retry: Switch View - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 4/5 initiated BrowserAutomation Information: 10001 : Command Start: Open View Picker - Attempt 1/5 BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 2/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 3/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 4/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 5/5 initiated BrowserAutomation Information: 10003 : Command Failure: Open View Picker - 5 attempts - total execution time 20500.6764ms - Return Result: OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.WebDriver.FindElement(String mechanism, String value) at OpenQA.Selenium.By.<.ctor>b__11_0(ISearchContext context) at OpenQA.Selenium.By.FindElement(ISearchContext context) at OpenQA.Selenium.WebDriver.FindElement(By by) at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.<>c.b74_0(IWebDriver driver) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs:line 1480 at Microsoft.Dynamics365.UIAutomation.Browser.DelegateBrowserCommand1.ExecuteCommand(IWebDriver driver, Object[] params) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\DelegateBrowserCommand.cs:line 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) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\BrowserCommand.cs:line 103 BrowserAutomation Information: 10004 : Command Retry: Switch View - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 5/5 initiated BrowserAutomation Information: 10001 : Command Start: Open View Picker - Attempt 1/5 BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 2/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 3/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 4/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open View Picker - OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) - Retry 5/5 initiated BrowserAutomation Information: 10003 : Command Failure: Open View Picker - 5 attempts - total execution time 20456.7365ms - Return Result: OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) at OpenQA.Selenium.WebDriver.FindElement(String mechanism, String value) at OpenQA.Selenium.By.<.ctor>b__11_0(ISearchContext context) at OpenQA.Selenium.By.FindElement(ISearchContext context) at OpenQA.Selenium.WebDriver.FindElement(By by) at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.<>c.<OpenViewPicker>b__74_0(IWebDriver driver) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs:line 1480 at Microsoft.Dynamics365.UIAutomation.Browser.DelegateBrowserCommand1.ExecuteCommand(IWebDriver driver, Object[] params) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\DelegateBrowserCommand.cs:line 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) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\BrowserCommand.cs:line 103 BrowserAutomation Information: 10003 : Command Failure: Switch View - 5 attempts - total execution time 132616.2066ms - Return Result: OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[contains(@aria-label,'Views')]"} (Session info: chrome=97.0.4692.99) 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) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\BrowserCommand.cs:line 138 at Microsoft.Dynamics365.UIAutomation.Browser.BrowserCommand1.Execute(IWebDriver driver) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\BrowserCommand.cs:line 35 at Microsoft.Dynamics365.UIAutomation.Browser.BrowserPage.Execute[TResult](BrowserCommandOptions options, Func2 delegate) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\BrowserPage.cs:line 182 at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.OpenViewPicker(Int32 thinkTime) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs:line 1473 at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.<>c__DisplayClass75_0.b__0(IWebDriver driver) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs:line 1509 at Microsoft.Dynamics365.UIAutomation.Browser.DelegateBrowserCommand1.ExecuteCommand(IWebDriver driver, Object[] params) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\DelegateBrowserCommand.cs:line 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) in C:\github\EasyRepro\Microsoft.Dynamics365.UIAutomation.Browser\BrowserCommand.cs:line 103 BrowserAutomation Information: 9000 : BrowserDisposing invoked. BrowserAutomation Information: 9001 : BrowserDisposing completed.

kelmendes commented 1 year ago

Tenta atualizar o Xpath, funcinou aqui.

image