Comments (18)
You should specify Settings file or path to it in task: EasyRepro.runsettings
from easyrepro.
Oh my gosh! You won't believe it.
I've found this question, and now my pipeline is working after adding a task to resize the screen.
Thank you for your help, after all I've learned several things.
from easyrepro.
8its Could you make a screenshot on an error and check it
from easyrepro.
onlineusername, password and crm url are set in EasyRepro.runsettings file.
what I am missing?
thank you
from easyrepro.
... and after modifying the code to make it runnable, same error as in the beginning
here the results of a local test execution
any hint will be welcome
thank you.
from easyrepro.
Please take a screenshot in Azure DevOps of how you pass parameters to run test step
from easyrepro.
This is how we call the test plan
this is the task in YAML format
`steps:
- task: VSTest@2
displayName: 'VsTest - testAssemblies TEST'
inputs:
testSelector: testPlan
testPlan: 2799
testSuite: '2800,2801'
testConfiguration: 7
searchFolder: '$(System.DefaultWorkingDirectory)\Microsoft.Dynamics365.UIAutomation.Sample\bin\Debug'
resultsFolder: '$(Common.TestResultsDirectory)'
uiTests: true
vsTestVersion: toolsInstaller
runInParallel: false
codeCoverageEnabled: true
diagnosticsEnabled: true
continueOnError: true`
The Test plan has been defined as follows
from easyrepro.
I´ve updated the RegressionTests.cs file, to open the Sales Hub app and commented everything after that.
EasyRepro.runsettings has been configured in the Pipeline
Error after running the pipeline
Standard_Console_Output.log
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 9770.4938ms - 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 16342.4372ms - Return Result: True BrowserAutomation Information: 10001 : Command Start: Open personalSettings SettingsMenu.About - Attempt 1/5 BrowserAutomation Information: 10002 : Command Success: Open personalSettings SettingsMenu.About - 1 attempts - total execution time 699.7381ms - Return Result: True BrowserAutomation Information: 10001 : Command Start: Dialog Click OK - Attempt 1/5 BrowserAutomation Information: 10002 : Command Success: Dialog Click OK - 1 attempts - total execution time 30161.6847ms - Return Result: True BrowserAutomation Information: 10001 : Command Start: Open App Sales Hub - Attempt 1/5 BrowserAutomation Information: 10004 : Command Retry: Open App Sales Hub - OpenQA.Selenium.ElementClickInterceptedException: element click intercepted: Element <iframe id="AppLandingPage" title="AppLandingPage" src="/%7b638181253350000220%7d/webresources/msdyn_appmanagementcontrol" class="pa-bk pa-cu pa-cm " cd_frame_id_="2c6d3d49d2b56fb748b123519a3223fe"></iframe> is not clickable at point (364, 591). Other element would receive the click: <div id="modalDialogRoot_1_1" tabindex="-1" class="pa-f pa-bk pa-a pa-p pa-au flexbox">...</div> (Session info: chrome=112.0.5615.138) - Retry 2/5 initiated BrowserAutomation Information: 10004 : Command Retry: Open App Sales Hub - OpenQA.Selenium.ElementClickInterceptedException: element click intercepted: Element <iframe id="AppLandingPage" title="AppLandingPage" src="/%7b638181253350000220%7d/webresources/msdyn_appmanagementcontrol" class="pa-bk pa-cu pa-cm " cd_frame_id_="099429835a801af46ddbc37d05218efd"></iframe> is not clickable at point (364, 591). Other element would receive the click: <div id="modalDialogRoot_1_1" tabindex="-1" class="pa-f pa-bk pa-a pa-p pa-au flexbox">...</div> (Session info: chrome=112.0.5615.138) - Retry 3/5 initiated BrowserAutomation Information: 10003 : Command Failure: Open App Sales Hub - 3 attempts - total execution time 13885.1272ms - Return Result: OpenQA.Selenium.ElementClickInterceptedException: element click intercepted: Element <iframe id="AppLandingPage" title="AppLandingPage" src="/%7b638181253350000220%7d/webresources/msdyn_appmanagementcontrol" class="pa-bk pa-cu pa-cm " cd_frame_id_="94c362b2284f45407006e69b57d8d26e"></iframe> is not clickable at point (364, 591). Other element would receive the click: <div id="modalDialogRoot_1_1" tabindex="-1" class="pa-f pa-bk pa-a pa-p pa-au flexbox">...</div> (Session info: chrome=112.0.5615.138) at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute) at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary
2 parameters)
at OpenQA.Selenium.WebDriver.InternalExecute(String driverCommandToExecute, Dictionary2 parameters) at OpenQA.Selenium.WebElement.Execute(String commandToExecute, Dictionary
2 parameters)
at OpenQA.Selenium.WebElement.Click()
at Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.<>c.b__2_0(IWebElement e) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs:line 43
at Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.WaitUntil(ISearchContext driver, Func2 searchFunc, Nullable
1 timeout, Action1 successCallback, Action failureCallback) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs:line 578 at Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.WaitUntilClickable(ISearchContext driver, By by, Nullable
1 timeout, Action1 successCallback, Action failureCallback) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs:line 528 at Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.WaitUntilClickable(ISearchContext driver, By by, Nullable
1 timeout, Action1 successCallback, String exceptionMessage) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs:line 520 at Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.ClickWhenAvailable(ISearchContext driver, By by, Nullable
1 timeout, String errorMessage) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs:line 43
at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.<>c__DisplayClass32_0.b__1(IWebElement appContainer) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs:line 475
at Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.WaitUntil(ISearchContext driver, Func2 searchFunc, Nullable
1 timeout, Action1 successCallback, Action failureCallback) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs:line 578 at Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.WaitUntilVisible(ISearchContext driver, By by, Nullable
1 timeout, Action1 successCallback, Action failureCallback) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs:line 503 at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.TryToClickInAppTile(String appName, IWebDriver driver) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs:line 474 at Microsoft.Dynamics365.UIAutomation.Api.UCI.WebClient.<>c__DisplayClass29_0.<OpenApp>b__0(IWebDriver driver) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Api.UCI\WebClient.cs:line 398 at Microsoft.Dynamics365.UIAutomation.Browser.DelegateBrowserCommand
1.ExecuteCommand(IWebDriver driver, Object[] params) in D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\DelegateBrowserCommand.cs:line 28
at Microsoft.Dynamics365.UIAutomation.Browser.BrowserCommand`1.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 D:\a\1\s\Microsoft.Dynamics365.UIAutomation.Browser\BrowserCommand.cs:line 103
Creating Page Source file with name EXCEPTION_Source_20230428080731.html
BrowserAutomation Information: 9000 : BrowserDisposing invoked.
BrowserAutomation Information: 9001 : BrowserDisposing completed.
Debug Trace:
Creating Page Source file with name EXCEPTION_Source_20230428080731.html
`
from easyrepro.
Enable video recording and check what is happening, it looks like some extra dialog is opening.
https://learn.microsoft.com/en-us/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file?view=vs-2022#videorecorder-data-collector
from easyrepro.
Nice feature! Now I can see that the test is not able to simulate a click on Sales, Accounts, so the test is stuck in the command xrmApp.Navigation.OpenSubArea("Sales",
"Accounts");` The error message is the same "Unable to click element" as I mentioned at the beginning.
One thing that is so confusing is that when I run the test Regression_EntityControls_GetValue_SetValue locally it works but when running in the pipeline it does not. Is there any particular reason for this behavior?
Thank you for your support.
from easyrepro.
Post screenshot please
from easyrepro.
Regression_EntityConttrols_GetValue_SetValue(). Some code is commented to avoid issues.
public void Regression_EntityControls_GetValue_SetValue()
{
var telemetry = new Microsoft.ApplicationInsights.TelemetryClient { InstrumentationKey = _azureKey };
telemetry.Context.Operation.Id = Guid.NewGuid().ToString();
telemetry.Context.Operation.ParentId = _sessionId;
telemetry.Context.GlobalProperties.Add("Test", TestContext.TestName);
var client = new WebClient(TestSettings.Options);
var xrmApp = new XrmApp(client);
try
{
telemetry.TrackTrace("Login Started");
xrmApp.OnlineLogin.Login(_xrmUri, _username, _password, _mfaSecretKey);
telemetry.TrackTrace("Login Completed");
TakeScreenshot(client, xrmApp.CommandResults.Last());
//xrmApp.Navigation.OpenApp(UCIAppName.Sales);
//telemetry.TrackTrace("OpenAbout Started");
//xrmApp.Navigation.OpenAbout();
//telemetry.TrackTrace("OpenAbout Completed");
//TakeScreenshot(client, xrmApp.CommandResults.Last());
//xrmApp.Dialogs.ClickOk();
telemetry.TrackTrace("Open Sales Hub Started");
xrmApp.Navigation.OpenApp(UCIAppName.Sales);
telemetry.TrackTrace("Open Sales Hub Completed");
TakeScreenshot(client, xrmApp.CommandResults.Last());
telemetry.TrackTrace("OpenSubArea Started");
xrmApp.Navigation.OpenSubArea("Sales", "Accounts");
telemetry.TrackTrace("OpenSubArea Completed");
TakeScreenshot(client, xrmApp.CommandResults.Last());
telemetry.TrackTrace("SwitchView Started");
xrmApp.Grid.SwitchView("All Accounts");
telemetry.TrackTrace("SwitchView Completed");
TakeScreenshot(client, xrmApp.CommandResults.Last());
//telemetry.TrackTrace("GetGridControl Started");
//var gridHtml = xrmApp.Grid.GetGridControl();
//WriteSource("GRID_", gridHtml);
//telemetry.TrackTrace("GetGridControl Completed");
telemetry.TrackTrace("Search Started");
xrmApp.Grid.Search("Economic");
telemetry.TrackTrace("Search Completed");
TakeScreenshot(client, xrmApp.CommandResults.Last());
telemetry.TrackTrace("OpenRecord Started");
xrmApp.Grid.OpenRecord(0);
telemetry.TrackTrace("OpenRecord Completed");
TakeScreenshot(client, xrmApp.CommandResults.Last());
#region Boolean
telemetry.TrackTrace("GetValue-Text Started");
xrmApp.Entity.GetValue("telephone1");
telemetry.TrackTrace("GetValue-Text Completed");
telemetry.TrackTrace("SetValue-Text Started");
xrmApp.Entity.SetValue("telephone1","867-5309");
telemetry.TrackTrace("SetValue-Text Completed");
#endregion
TakeScreenshot(client, xrmApp.CommandResults.Last());
//#region Lookup
//telemetry.TrackTrace("SetValue-LookupItem Started");
//xrmApp.Entity.SetValue(new LookupItem { Name = "customerid", Value = "maria campbell", Index = 0 });
//telemetry.TrackTrace("SetValue-LookupItem Completed");
//#endregion
telemetry.TrackEvent(String.Format("{0} is successful.", TestContext.TestName));
}
catch (System.Exception ex)
{
telemetry.TrackException(ex);
WriteSource("EXCEPTION_Source_", client.Browser.Driver.PageSource);
TakeScreenshot(client, xrmApp.CommandResults.Last());
throw ex;
}
finally
{
xrmApp.Dispose();
telemetry.Flush();
}
}
Execution from Visual Studio locally
from easyrepro.
I meant dynamics web app screenshot when error appeared
from easyrepro.
There is no error at all. The following is a screenshot of the ScreenCapture.wmv file created during the test.
In the video I can see the same screen from minute1.15 until the end at min 2.49
from easyrepro.
This is the video screen capture. At the end, after closing the blue bubble at top right, the test doesn´t do anything else, and it should open the Accounts list.
Regression_Test.mp4
I hope this could help
from easyrepro.
Could please post screen for full stacktrace
Looks like issue with blue drop that block any click on app, you should close it before.
Do you use the same account for local and Azure test run?
Do you see this drop on local run?
from easyrepro.
Could please post screen for full stacktrace Looks like issue with blue drop that block any click on app, you should close it before. Do you use the same account for local and Azure test run? Do you see this drop on local run?
Sorry Shakevg, I don´t know where to get the full stacktrace.
I use the same account for local and pipeline runs.
In local run the blue bubble does not appear.
Thank you
from easyrepro.
Hello.
Here is the Error and Stack Trace pointing at line 335:
Error message Test method Microsoft.Dynamics365.UIAutomation.Sample.UCI.RegressionTests.Regression_EntityControls_GetValue_SetValue threw exception: System.InvalidOperationException: Unable to click element. Stack trace at Microsoft.Dynamics365.UIAutomation.Sample.UCI.RegressionTests.Regression_EntityControls_GetValue_SetValue() in \Microsoft.Dynamics365.UIAutomation.Sample\AzureDevOps\UCI\RegressionTests.cs:line 335
Here is the function that I am testing. Line 335 is the throw ex
in the catch
at the end
public void Regression_EntityControls_GetValue_SetValue()
{
var telemetry = new Microsoft.ApplicationInsights.TelemetryClient { InstrumentationKey = _azureKey };
telemetry.Context.Operation.Id = Guid.NewGuid().ToString();
telemetry.Context.Operation.ParentId = _sessionId;
telemetry.Context.GlobalProperties.Add("Test", TestContext.TestName);
var client = new WebClient(TestSettings.Options);
var xrmApp = new XrmApp(client);
try
{
telemetry.TrackTrace("Login Started");
xrmApp.OnlineLogin.Login(_xrmUri, _username, _password, _mfaSecretKey);
telemetry.TrackTrace("Login Completed");
TakeScreenshot(client, xrmApp.CommandResults.Last());
//xrmApp.Navigation.OpenApp(UCIAppName.Sales);
// ***
//telemetry.TrackTrace("OpenAbout Started");
//xrmApp.Navigation.OpenAbout();
//telemetry.TrackTrace("OpenAbout Completed");
//TakeScreenshot(client, xrmApp.CommandResults.Last());
//xrmApp.Dialogs.ClickOk();
//telemetry.TrackTrace("Open Sales Hub Started");
//xrmApp.Navigation.OpenApp(UCIAppName.Sales);
//telemetry.TrackTrace("Open Sales Hub Completed");
//TakeScreenshot(client, xrmApp.CommandResults.Last());
telemetry.TrackTrace("OpenSubArea Started");
xrmApp.Navigation.OpenSubArea("Sales", "Accounts");
telemetry.TrackTrace("OpenSubArea Completed");
TakeScreenshot(client, xrmApp.CommandResults.Last());
//telemetry.TrackTrace("SwitchView Started");
//xrmApp.Grid.SwitchView("All Accounts");
//telemetry.TrackTrace("SwitchView Completed");
//TakeScreenshot(client, xrmApp.CommandResults.Last());
// ***
//telemetry.TrackTrace("GetGridControl Started");
//var gridHtml = xrmApp.Grid.GetGridControl();
//WriteSource("GRID_", gridHtml);
//telemetry.TrackTrace("GetGridControl Completed");
//telemetry.TrackTrace("Search Started");
//xrmApp.Grid.Search("Economic");
//telemetry.TrackTrace("Search Completed");
//TakeScreenshot(client, xrmApp.CommandResults.Last());
//telemetry.TrackTrace("OpenRecord Started");
//xrmApp.Grid.OpenRecord(0);
//telemetry.TrackTrace("OpenRecord Completed");
//TakeScreenshot(client, xrmApp.CommandResults.Last());
//#region Boolean
//telemetry.TrackTrace("GetValue-Text Started");
//xrmApp.Entity.GetValue("telephone1");
//telemetry.TrackTrace("GetValue-Text Completed");
//telemetry.TrackTrace("SetValue-Text Started");
//xrmApp.Entity.SetValue("telephone1","867-5309");
//telemetry.TrackTrace("SetValue-Text Completed");
//#endregion
//TakeScreenshot(client, xrmApp.CommandResults.Last());
// ***
//#region Lookup
//telemetry.TrackTrace("SetValue-LookupItem Started");
//xrmApp.Entity.SetValue(new LookupItem { Name = "customerid", Value = "maria campbell", Index = 0 });
//telemetry.TrackTrace("SetValue-LookupItem Completed");
//#endregion
telemetry.TrackEvent(String.Format("{0} is successful.", TestContext.TestName));
}
catch (System.Exception ex)
{
telemetry.TrackException(ex);
WriteSource("EXCEPTION_Source_", client.Browser.Driver.PageSource);
TakeScreenshot(client, xrmApp.CommandResults.Last());
throw ex; // line 335
}
finally
{
xrmApp.Dispose();
telemetry.Flush();
}
}
from easyrepro.
Related Issues (20)
- Unable to run edge browser in private mode
- [BUG] Unable to open single record in grid HOT 1
- [HOW-TO] Visit an specific URL HOT 1
- [BUG] <Issue Description>Sign in prompt issue getting after login in to the application HOT 1
- [BUG] <MFA Login is not working as per instruction given regarding setting up Microsoft Account. I am following all the instructions but still getting error "An Error occur entering OTC. Exception: Character is not a Base32 character.">
- aadtile can't be found HOT 3
- Unable to see the specflow test in Visual Studio 2019 Test Explorer HOT 4
- [HOW-TO] <Is there a build-in method for Dialog/QuickCreate to click a radio button?>
- [HOW-TO] <How can I target iFrame within QuickCreate?> HOT 2
- [FEATURE] Add instrumentation for Login with MFA HOT 1
- [HOW-TO] xrmApp.BusinessProcessFlow.SetValue() not work. HOT 1
- SubGrid.GetSubGridItemsCount HOT 1
- How to handle authentication login screen specific to a particular organization ? HOT 2
- [HOW-TO] Add Product to a Quote HOT 1
- regarding Location dialogue in CRM app HOT 15
- [BUG] On a quick create form with a multi select option set, the flyout is not closing causing cover up of additional controls.
- [BUG] EasyRepro tests on Chrome M2 Mac are really slow HOT 1
- Release Wave 2 - 2023 - few dropdown optionsets are not getting identified with data-id when the script ran in New Outlook, where in existing it works fine.
- [HOW-TO] encrypt the password in easyrepro framework. ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyrepro.