-
Notifications
You must be signed in to change notification settings - Fork 291
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] Cannot login to Dynamics due issue in Login method #752
Comments
@Shakevg - Per Angel's fixes that have been merged into develop, could you validate that your scenario is resolved by testing with the 'develop' branch? Thanks, |
@TYLEROL, @AngelRodriguez8008 private LoginResult Login(IWebDriver driver, Uri uri, SecureString username, SecureString password, SecureString mfaSecrectKey = null, Action<LoginRedirectEventArgs> redirectAction = null)
{
bool online = !(OnlineDomains != null && !OnlineDomains.Any(d => uri.Host.EndsWith(d)));
driver.Navigate().GoToUrl(uri);
....
if(mfaSecrectKey != null)
{
EnterOneTimeCode(driver, mfaSecrectKey);
}
.....
} |
Thanks @Shakevg, I'm getting some problems by fixing this. I't taking some other considerations Like, waiting time to fail & error message. Thanks. |
Hi @Shakevg, Thanks again for the Feedback. I'm trying to simulate the situation but I not't able to tests without MFA. I will try to find one Env to test. Howerver, I think that my lastest changes should fix this problem. I will keep it in PR #754, where I fix other Bug. @TYLEROL let me know please if you need split this in two different PR. Thanks & br |
Can we get the fixes into the Nuget Package asap please? My whole test suited is blocked by this failed login issue. And I can not simply roleback because the previous (working) version is no longer on Nuget available (only some very old versions, which have other breaking changes). |
Sorry @rsObjektkultur, I will test better the next time. Maybe can you compile the DLL by yourself in the middle time, until this get released. |
* Feature for Issue #565 Fix for debug error in Issue #571 * Add check to only set Time value if Time field is present * Updated as pull request comments * Initial Testing * Working update with Firefox and SelectLookup(field, index); * Updated with correct example documentation * Changes for WebClient - Updated: SelectLookup(LookupItem field, bool clearFieldValue = true, bool openLookupPage = true) - New: SelectLookup(LookupItem control) - Added WaitUntilAvailable checks for OpenSubArea for resiliency on required items - Added small thinkTime for dialog interaction on lookups * Fixed an issue with the login page and added operation mark. * Adding additional EasyRepro flag for test mode * Change from PR 603 (including on develop branch instead) * Added a meaningful error message when the date field gets into a timeout. * Select Tab will now click on the ... if the menu item is there * Update README.md * Upgrade Chrome Driver * Updating Lookup SetValue to scope just to main page and not header. Also fixed issue with click after search text is entered. (#658) * Updated Chromedriver to version 77 and Firefox driver to 26 (#659) * Added marking operation for 3rd Party login (#660) * Add waits for OpenApp to wait for the containers to be available before moving on. * Fixed a timing issue with SignOut. Added an API that Opens and App in the Web Client API's * Updated to not use a wait * Add crm12 (France) region to list of supported XrmDomains * Update README.md with run instructions * Field.IsRequired; Test/Example Methods; AppElementReference Updated * Included Changes * Users/darent/performancecenteruci (#682) * Adding support for performance center in UCI * Add support for Peformance Center Telemetry in UCI. Add Telemetry methods to track API, Performance Center and Browser Telemetry a lot easier. Added Sample test to show how to track telemetry. * Removed files not needed * Added support for Pass Through Login * Added support for pass through authentication. This will navigate to the environment url but not require credentials. * Field Required methods moved to Validate folder * Fix element reference for sort column. Added Grid Sort Test. Updated Chromedriver to 79 (#697) * fixed issue with Lookup field not working for Quick Create form (#702) (#620) * fixed issue with quick create form not interactable (#684) * Handle Pending Email Warning Consider changing https://easyrepro.crm.dynamics.com to xrmBrowser.Entity.SetValue("websiteurl", "https://www.microsoft.com/"); for some reason this Test fails on my machine with the easyrepro URL. * Create Header Flyout for Get-SetHeaderValue * Add conditional check to see if header flyout is already expanded * Create ExpandHeader helper method * Fix ClickWhenAvailable * Fix Set Date & Time * Add app.build.config * Allow to Configure Drivers Path * Correct Ordered Tests * Fix app.build.config * Fix app.build.config * Fix app.build.config * Add UsePrivate Mode to App.Config * Add UsePrivate Mode to App.Config * Multi-Factor Authentication is Working / UCI Performance is broke (set disable by default) / Fix Tests is required * Add MFA Key to UCI Tests * Rebuild Ordered Tests * Merge branch 'users/angel/addDriversPathToAppConfig' into users/angel/addMFA # Conflicts: # Microsoft.Dynamics365.UIAutomation.Sample/TestSettings.cs # Microsoft.Dynamics365.UIAutomation.Sample/UCI/Create/CreateOpportunity.cs # Microsoft.Dynamics365.UIAutomation.Sample/UCI/UnifiedInterface.orderedtest * Fix Build * Fix Related grid button * Fixed an issue with login and specifying an appid to default to after login. Fixed some timing issues with OpenApp Method and setting the Test & Performance Modes * Fix app.config * Fix DriversPath & UsePrivateMode Default Values * Split Logic for Get & Set Lookup Values in Header or Body by passing the Field Container * Broke Commit: Refactoring SeleniumExtensions * Add double click option for opening a grid row. Prevents opening a Lookup field instead. * Get Field Controls in Context of his Container (ex. Header Flyout), extended to Lookups & OptionSets + Refactor&Consolidate SeleniumExtensions * Add a Test * Add Create from Subgrid method * Fix Clear DateTime Field (Issue #745) * Add Tests * Cleaning * Fix Bug in Submenu Navigation * Fix XPath for Personal Settings Menu * Merge branch 'develop' into users/angel/fixSetHeaderValues * Add MfaSecrectKey to app.build.config * Restore ClickIfVisible * Roll back OpenRecord Logic -> DoubleClick fail on this cell * Merge branch 'users/angel/fixSetHeaderValues' into users/angel/fixSetDateTimeValue * Fix Set DateTime Value in Headers * Minor Fix - Double Click oncationaly Fail on Select Date Value * Get DateTime from Header Context * Fix UCITestAssignAccount * Fix Double Click on OpenRecord from Grid * Minor Fixes in Samples Tests ( from 109 tests, 93 passed) * Fix #752 do not try to Enter OTC if there is not Secrect Key * Enable Set Privacy Mode for Edge * Add Some Demo Samples to UCI.TestsBase * Add Some Demo Samples: how to use UCI.TestsBase * Add Some Demo Samples: how to use UCI.TestsBase * Add Some Demo Samples: how to use UCI.TestsBase : Ignore Exception in Demo Tests when Login intentional fail * Isolate DoubleClick / Click Fail Logic * Fix Login for Users without MFA * Isolate Fix: DoubleClick / Click failing Logic * Fix: Navigation Sitemap Button Change => TestInitialize Fail => Browser do not get closed (Fix previous Issue that was solved with driver.Throw <= remove this) * Rollback Logic with driver.Throw, Fix TestsBase * Remove unused method not relevant for this PR * Minor Fixes * Restore Licence Comment * Remove useless calls to Navigate * Unify the Logic of GetValue with LookupItem & LookupItem[] * Make the test UCITestGetValueFromLookup_MultiAndSingle_ReturnsTheSameResult Data Independent * Bug Fix: Returning Lookup Values in Lower Case * Fix #770: Add Wait before redirect, for some lazy browsers * Add Trace Config & Trace Helpers Classes * Add Trace Config & Trace Helpers Classes * Fix Bug: Traces are being writed just for the first test * Allows retrieval of form notifications * Fixed return value * Added support for flip switch control * Fixes based on feedback * Added some comments for readability * Fixed wrong fix for trygetelement Added test * Replaced all instances of 'MfaSecrectKey' with 'MfaSecretKey' * Added MFA instructions to README.md * Add MFA instructions to README.md * Add MFA instructions to README.md * Removed failure callback from TryToClickInAppTile() (#793) * Removed failure callback. This caused an upstream browser project failure that results in application termination (instead of other methods in OpenApp()) * **Unrelated: Fixing build issue with wrong param name * Messaging changes in OpenApp sub-methods * Changed HasElement to waits. This avoids exceptions when the ribbon takes some time to load (#807) Co-authored-by: Martijn Vermaat <[email protected]> * Add tests for Areas and SubAreas (#799) Co-authored-by: Tyler Olson <[email protected]> * Update Chrome driver to version 81 (#822) * Add support for Boolean Optionset button type (#823) * Address issue with LookupItem ClearValue/SetValue (#828) * Adding BrowserOptions for Chrome browser (#829) * Adding Additional Browser Options * Keys already present in the dictionary with custom props/metrics (#830) Observer that when using the TrackCommandEvents, when adding custom props and metrics to it, it was having issues with keys already being present in the dictionaries, by merging them rather than assigning it, we prevent this issue from happening. Same what its being done in the TrackPerformanceEvents. * DateTimeControl changes for SetValue() and SetHeaderValue() (#831) * Fixes to SetValue/SetHeaderValue for DateTimeControl * Changes to support updating Date&Time control (not DateOnly) * Tweak to PR823 to not fail if element does not exist (allowing other Boolean scenarios to proceed) (#832) * Get HeaderTitle and FormName (#833) * Get HeaderTitle and FormName * Fixes for Set/Get Header Values (#838) * Set/Get Header fixes * Resiliency fix for updating Time value on DateTimeControl Fixing GetHeaderValue if Time value is present * Adding new GetFooterMessageValue method (#841) * New method - GetFooterMessageValue * Updates for Finding More Commands on Related SubGrid (#844) * Update Entity_RecordSetNavList reference to the proper element (#847) * PublishDialog, SetStateDialog, and GetFormNotifications fixes (#845) * Lookup & Quick Create Fixes (#848) * GetBusinessProcessError method for Unified Interface (#850) * Fixing build error * Added new method Entity.GetBusinessProcessError(); * Include field label as part of GetField() method (#853) * Reverting UCI samples to previous base for simplification (#855) * Reverting samples to previous base for simplification. Also mark samples with issues * Update TestCategory for failing tests and added MFA key support * Change TestBase samples to Labs and add TestCategory to tests currently failing * Update DateTimeControl.cs (#856) Dynamics 365 Expects time as AM/PM some regional settings send values as Am and Pm which causes a failure of the SetValue, forcing ToUpper() resolves this issue * RelatedGrid Fixes (#859) * Fix for Entity.SelectTab() * Fixing ClickCommand code for related grids * Add FormContext to SetValue within Timeline controls to address #865 (#866) * Changes to support Entity SubGrids (#864) * Adding SubGrid page off Entity page Cleanup Test references Deprecate old subgrid methods off Entity page * Fixes for Entity.SubGrid.OpenSubGridRecord() * Changes for SubGrid use: - GetSubGridItems - GetSubGridItemsCount - ClickCommand - OpenSubGridRecord * Resiliency change on WaitForMainPage() * Fix subgrid reference in Samples to reflect schema name * Remove bug tag on test * Supporting third level command buttons in RelatedGrid, Entity.SubGrid, and CommandBar * Changes to support 3rd level CommandBar, RelatedGrid, and Entity.SubGrid commands (test cleanup) * Changes to two level view selection * Extend new SubGrid capabilities to Dashboard Add WaitForTransaction after selecting Dashboard * Changes to support SubGrid.SwitchView() * Adjusting to WaitUntilAvailable on WaitForMainPage() * MultiSelect Tweaks (Add) * Test fixes, updates for Multi-Select SetValue * Adding SubGrid 'Search' method * Close Header on SetHeaderValue() method complete * Added SubGridSelectAll method * Fix for Issue 871 * Changes to fix Timeline.AddPhoneCall() * Fixes for CommandBar.ClickCommand() (#875) * Added option to set downloads folder path for chrome and firefox (#873) * Added options to set downloads folder path * Update for Performance Center Page name (#914) * Fixes to get Timeline.AddNote() working in Canary (v 9.1.0000.21028) (#929) * Fix race condition on AddNote (#931) * BooleanItem Update (#915) * Added support for using toggle custom control for two option sets * Added support for using toggle custom control for two option sets for GetValue Co-authored-by: Kell <[email protected]> * Fixes 'ElementNotInteractable' (#882) Co-authored-by: Martijn Vermaat <[email protected]> * Fix for modes (#878) Co-authored-by: Martijn Vermaat <[email protected]> * Fixed ClickSubGridCommand. Previously, clicking a command that was in a flyout would only work if the flyout happened to be in the 'More Commands'/ellipsis, now it works regardless. (#918) * Support buttons on Duplicate Detection Dialog in UCI (#938) * Fixes issue with getting subgrid items (will properly cycle through listed items and not repeat data values for first item only (#937) * Changes to support GetField on BPF (#941) * Remove calls to clearfocus (#943) * WaitForMainPage now working as expected (#946) * WaitForMainPage is waiting till timeout since the focus is not on the default content * updated to use existing method * Revert "updated to use existing method" This reverts commit d08ef30. * IsReadOnly support for additional field types (#947) * Adding support for CloseActivity dialog (e.g. CloseTask) (#960) * Added wait and extra sendkeys action to minimize '---' text being left (#964) * Switch to contains check (#965) * Check unique lookup style fields which present ReadOnly differently (#985) * Check unique lookup style fields which present ReadOnly in a different format * Add XrmDomain support for UAE region * Fixes for setting DateTime fields in Header (#986) * [BUG] Grid Sort not working in UCI | No more 1 click sort #942 (#966) * Added Selenium.WebDriver.ChromeDriver and removed Selenium.Chrome.WebDriver * Updated UCI Grid Sort method to include a sort option button text * updated missing element reference * restore back to the original Selenium.Chrome.WebDriver * Revert "restore back to the original Selenium.Chrome.WebDriver" This reverts commit 31818b3. Co-authored-by: Thathi Pammi <[email protected]> * Adjust check for more commands overflow button (#987) * Adjustments to SetInputValue for fields (#988) * Fix to check for more commands overflow button (#989) * Adjust lookup field check to contains instead of exact match. (#990) * Fixes for setting DateField values (#992) * Fixes for checking GetField().IsRequired on BPF (#994) * Dialog SetValue OptionSet race condition fix (#995) * Fix objRef error trying to click element * Added WaitForTransaction * Honour `BrowserOptions.CommandTimeout` (#1003) * Use BrowserOptions.CommandTimeout * Default to 20 minutes if unspecified * updated TrySetValue to check for FormContextType (#1007) Co-authored-by: Ali Youssefi <[email protected]> * Fix issue that SetValue For Lookup Taking too much time (#1008) Co-authored-by: Victor Grigoriev <[email protected]> * Update Instruction for obtain MFA secret key (#1009) Instruction for obtaining MFA secret key was outdated, update steps * Fix broken app switching due to 2020 release wave 2 changes (#1013) * fix: broken app switching since wave 2 release * fix: wave 2 xpath for uci app menu button * fix: backwards compatibility for app-switching * Fix for GetFormNotifications (#1024) * fix: incorrect IDs returned for subgrid items (#1031) * fix: broken app switching since wave 2 release * fix: wave 2 xpath for uci app menu button * fix: backwards compatibility for app-switching * fix: incorrect IDs returned for subgrid items * refactor: use existing ExecuteScript extension * fix: related tab doesn't exist error if overflowed (#1033) * fix: related tab doesn't exist error if overflowed * style: add space * fix: GetValue for LookupItem duplicating result (#1034) * fix: unable to clear quick creates on lookups (#1035) * fix: unable to set boolean on BPF (#1036) * fix: signout broken (#1038) * fix: SelectForm doesn't wait for form events (#1039) * fix: error clearing datetime time component (#1040) * fix: get and set multi-select option set values (#1041) * fix: unable to find header on form load (#1042) * fix: GetValue missing for quick create datetimes (#1044) * fix: unable to add email contacts (#1045) * fix: selecting a lookup entity broken (#1046) * fix: invalid element state error on assign to team (#1047) * Fixed Sample project build errors (#1048) * fixed build failures in samples * Renamed funtions for readability * fix: no rows found error for OpenLookupRecord (#1043) * Convert to netcoreapp3.1 * Ability to enable performance Mode on OpenEntity (#1052) * Fix issue that SetValue For Lookup Taking too much time * ability to enable performance Mode on OpenEntity Co-authored-by: Victor Grigoriev <[email protected]> * Fix id reading for get grid items (#1053) * Fix issue that SetValue For Lookup Taking too much time * Use by default "data-id" attribute instead of "id", because it is always contains unique value. Co-authored-by: Victor Grigoriev <[email protected]> * Fix Field.IsReadOnly for an input field on Cannary (#1067) Co-authored-by: Victor Grigoriev <[email protected]> * Fix open Performance Widget when performance issues exist (#1068) Co-authored-by: Victor Grigoriev <[email protected]> * Fix Remove Lookup Value when quickly clear many lookup fields (#1070) Co-authored-by: Victor Grigoriev <[email protected]> * Dev/zwuai/uci open app fix (#1085) * Added fix to stop instances using UCI with a default app from hanging for up to a minute due to static order of operations * removed nested if else Co-authored-by: Zoe Dawson <[email protected]> * fix for issue 1087 due to recent release of Dynamics 365 (commandbar now has extra <button> in DOM for each commandbar item (#1090) * Update webclient for mfa validation (#1089) Validate null value on MFA before executing the do-while. * Fix for ClickCommand operation on a subgrid (issue 1087) (#1093) Co-authored-by: Martyn Nevers <[email protected]> * Fix for subgrid click command overflow (issue 1087) (#1094) Co-authored-by: Martyn Nevers <[email protected]> * fix: related grid commands and quick create menu items (#1095) * fix: broken app switching since wave 2 release * fix: wave 2 xpath for uci app menu button * fix: backwards compatibility for app-switching * Update AppElementReference.cs * Updated Field.ReadOnly to work for textarea elements (#1097) * delete one parenthesis and added semicolon (#1098) Co-authored-by: Timotej Palus <[email protected]> * Resolved dialog context not found and added feature select tab and click command on dialog (#1100) * Fixed Dialog issue Fixed dialog xpath and added select tab and click command for dialog * Update WebClient.cs * removed unnecessary element * Added Select tab feature for dialog * Added summary for click commnd and Select tab Co-authored-by: Ashish Kishore <[email protected]> * Fix GetGridItems command (#1101) Co-authored-by: Timotej Palus <[email protected]> * Fix Step 7 for MFA Support instruction (#1102) Remove incorrect text from MFA Support configuration instruction * Update README.md (#1106) Improve steps for "MFA Support" instruction * Converted to net5.0. Removed other projects Co-authored-by: Tyler Olson <[email protected]> Co-authored-by: Thathi Pammi <[email protected]> Co-authored-by: Daren Turner <[email protected]> Co-authored-by: Martijn Vermaat <[email protected]> Co-authored-by: Angel A. Rodriguez <[email protected]> Co-authored-by: Greg <[email protected]> Co-authored-by: Chris Fairfax <[email protected]> Co-authored-by: Khoa Nguyen <[email protected]> Co-authored-by: Josh Wells <[email protected]> Co-authored-by: Rob Swafford <[email protected]> Co-authored-by: Kalyani P <[email protected]> Co-authored-by: bwmodular <[email protected]> Co-authored-by: Ben Walker <[email protected]> Co-authored-by: Martijn Vermaat <[email protected]> Co-authored-by: Dylan Haskins <[email protected]> Co-authored-by: Josh Wells <[email protected]> Co-authored-by: Andres Alvarez Skinner <[email protected]> Co-authored-by: thathi <[email protected]> Co-authored-by: Joel Kell <[email protected]> Co-authored-by: Kell <[email protected]> Co-authored-by: LukeBenting <[email protected]> Co-authored-by: Thathi Pammi <[email protected]> Co-authored-by: Benjamin <[email protected]> Co-authored-by: Ali Youssefi <[email protected]> Co-authored-by: Ali Youssefi <[email protected]> Co-authored-by: Shakevg <[email protected]> Co-authored-by: Victor Grigoriev <[email protected]> Co-authored-by: Max Ewing <[email protected]> Co-authored-by: Max Ewing <[email protected]> Co-authored-by: Allan Munar <[email protected]> Co-authored-by: Zoe <[email protected]> Co-authored-by: Zoe Dawson <[email protected]> Co-authored-by: Edmund Barton <[email protected]> Co-authored-by: imartinflores <[email protected]> Co-authored-by: MartynNevers <[email protected]> Co-authored-by: Martyn Nevers <[email protected]> Co-authored-by: Timo Paluš <[email protected]> Co-authored-by: Timotej Palus <[email protected]> Co-authored-by: Ashish Kishore <[email protected]> Co-authored-by: Ashish Kishore <[email protected]> Co-authored-by: Allan Munar <[email protected]>
Bug Report
Login method fails due trying to click to not existing controls, but do not check that is is exists before
EasyRepro Version
UCI or Classic Web
Online or On Premise
Browser
Describe the bug
During login test trying to click to not existing controls, but do not check that is is exists before
Stack Trace:
Code to reproduce
Run UCITestOpenContactRetrieveHeaderValues test
Expected behavior
It should be verification that controls exists before click
The text was updated successfully, but these errors were encountered: