Skip to content
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

DateTimeControl changes for SetValue() and SetHeaderValue() #831

Merged
merged 5 commits into from Apr 22, 2020

Conversation

TYLEROL
Copy link
Member

@TYLEROL TYLEROL commented Apr 22, 2020

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (updates to documentation, formatting, etc.)

Description

  • Changes to set DateTime control values on Form/Header (Date&Time / DateOnly format)
  • Added additional examples to SetValue() / SetHeaderValue() methods

Issues addressed

#820
#795

All submissions:

  • My code follows the code style of this project.
  • Do existing samples that are effected by this change still run?
  • I have added samples for new functionality.
  • I raise detailed error messages when possible.
  • My code does not rely on labels that have the option to be hidden.

Which browsers was this tested on?

  • Chrome
  • Firefox
  • IE
  • Edge

@TYLEROL TYLEROL linked an issue Apr 22, 2020 that may be closed by this pull request
@TYLEROL TYLEROL added the bug label Apr 22, 2020
@TYLEROL TYLEROL added this to the 9.1.0.14407 milestone Apr 22, 2020
@TYLEROL TYLEROL linked an issue Apr 22, 2020 that may be closed by this pull request
12 tasks
@TYLEROL TYLEROL requested review from dtu11 and 04diiguyi and removed request for 04diiguyi April 22, 2020 20:57
Copy link
Collaborator

@jowells1 jowells1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good

Copy link
Collaborator

@jowells1 jowells1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes still appear to be good

@jowells1 jowells1 self-requested a review April 22, 2020 21:32
@TYLEROL TYLEROL merged commit 534cd9e into develop Apr 22, 2020
@TYLEROL TYLEROL deleted the dev/tylerol/IssueSettingDateinDateTimecontrol branch April 22, 2020 22:11
TYLEROL added a commit that referenced this pull request Sep 30, 2021
* 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 <martijn.vermaat@dynamichands.nl>

* Add tests for Areas and SubAreas (#799)

Co-authored-by: Tyler Olson <tylerol@microsoft.com>

* 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 <joel.kell@bearingpoint.com>

* Fixes 'ElementNotInteractable' (#882)

Co-authored-by: Martijn Vermaat <martijn.vermaat@dynamichands.nl>

* Fix for modes (#878)

Co-authored-by: Martijn Vermaat <martijn.vermaat@dynamichands.nl>

* 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 <thathireddy.pammi@openwork.uk.com>

* 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 <alyousse@microsoft.com>

* Fix issue that SetValue For Lookup Taking too much time (#1008)

Co-authored-by: Victor Grigoriev <Victor_Grigoriev@epam.com>

* 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 <Victor_Grigoriev@epam.com>

* 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 <Victor_Grigoriev@epam.com>

* Fix Field.IsReadOnly for an input field on Cannary (#1067)

Co-authored-by: Victor Grigoriev <Victor_Grigoriev@epam.com>

* Fix open Performance Widget when performance issues exist (#1068)

Co-authored-by: Victor Grigoriev <Victor_Grigoriev@epam.com>

* Fix Remove Lookup Value when quickly clear many lookup fields (#1070)

Co-authored-by: Victor Grigoriev <Victor_Grigoriev@epam.com>

* 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 <zoe.dawson@capgemini.com>

* 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 <martyn@esdet.com>

* Fix for subgrid click command overflow (issue 1087) (#1094)

Co-authored-by: Martyn Nevers <martyn@esdet.com>

* 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 <timotej.palus@networg.com>

* 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 <ashish.kishore.ext@siemens.com>

* Fix GetGridItems command (#1101)

Co-authored-by: Timotej Palus <timotej.palus@networg.com>

* 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 <tylerol@microsoft.com>
Co-authored-by: Thathi Pammi <thathi123@gmail.com>
Co-authored-by: Daren Turner <darent@microsoft.com>
Co-authored-by: Martijn Vermaat <martijn.vermaat@dynamichands.nl>
Co-authored-by: Angel A. Rodriguez <angel.rodriguez@outlook.at>
Co-authored-by: Greg <gregory.degruy@gmail.com>
Co-authored-by: Chris Fairfax <cfairfax@hitachisolutions.com>
Co-authored-by: Khoa Nguyen <Khoa.Nguyen@veritec.com.au>
Co-authored-by: Josh Wells <jowells@live.com>
Co-authored-by: Rob Swafford <rswafford@golubcapital.com>
Co-authored-by: Kalyani P <kalyani@jlitconsulting.co.uk>
Co-authored-by: bwmodular <bwmodular@users.noreply.github.com>
Co-authored-by: Ben Walker <ben.walker@it.ox.ac.uk>
Co-authored-by: Martijn Vermaat <13309338+mVermaat@users.noreply.github.com>
Co-authored-by: Dylan Haskins <dylan@haskins.co.nz>
Co-authored-by: Josh Wells <34693792+jowells1@users.noreply.github.com>
Co-authored-by: Andres Alvarez Skinner <alvarezskinner@gmail.com>
Co-authored-by: thathi <thathi@jlitconsulting.co.uk>
Co-authored-by: Joel Kell <joelkell75@gmail.com>
Co-authored-by: Kell <joel.kell@bearingpoint.com>
Co-authored-by: LukeBenting <luke@lukebenting.com>
Co-authored-by: Thathi Pammi <thathireddy.pammi@openwork.uk.com>
Co-authored-by: Benjamin <63734414+BenjaminP-GitHub@users.noreply.github.com>
Co-authored-by: Ali Youssefi <ali.youssefi@microsoft.com>
Co-authored-by: Ali Youssefi <alyousse@microsoft.com>
Co-authored-by: Shakevg <42133199+Shakevg@users.noreply.github.com>
Co-authored-by: Victor Grigoriev <Victor_Grigoriev@epam.com>
Co-authored-by: Max Ewing <max.ewing@outlook.com>
Co-authored-by: Max Ewing <max.ewing@capgemini.com>
Co-authored-by: Allan Munar <Allan.Munar@farmlands.co.nz>
Co-authored-by: Zoe <zoe.dawson1812@live.com>
Co-authored-by: Zoe Dawson <zoe.dawson@capgemini.com>
Co-authored-by: Edmund Barton <30481490+3dmundbarton@users.noreply.github.com>
Co-authored-by: imartinflores <imartinflores@gmail.com>
Co-authored-by: MartynNevers <martynnevers@gmail.com>
Co-authored-by: Martyn Nevers <martyn@esdet.com>
Co-authored-by: Timo Paluš <58347555+tpalus@users.noreply.github.com>
Co-authored-by: Timotej Palus <timotej.palus@networg.com>
Co-authored-by: Ashish Kishore <atear10@gmail.com>
Co-authored-by: Ashish Kishore <ashish.kishore.ext@siemens.com>
Co-authored-by: Allan Munar <Allan.Munar@mbie.govt.nz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to set Date field in UCI [BUG] Entering a value in Date control fails
2 participants