Open sarahliTC opened 2 years ago
Hi.
I've got the same behavior as described in "Behavior 1" with two new fields in Quote entity: Start date and End date. It seems like the automation is stuck in the Start date.
Any news regarding this issue?
Thank you.
// update
I have a test case that runs successfully and creates two opportunities in a row. I´ve added some code to set a value in the Est. Close Date:
When running the test it starts looping in this date field, going back to the Est. Close Date over and over. Other fields can be set using the SetValue sentence, including LookUps and OptionSets. I´ve only got this behavior with date fields.
SetValue is an overloaded function. I´m wondering if the corresponding SetValue function for DateTime fields has some missing code...
Thank you.
I've finally found a solution.
Instead of using a DateTime field, I've set the date as text value directly, as follows:
// Date format MM/DD/YYYY
// Date is sent as text to be able to assign a date to fields
xrmApp.Entity.SetValue("startdate", "6/1/2023");
xrmApp.Entity.SetValue("enddate", "6/30/2023");
This works for me. Thank you
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
We are having issues with entering/selecting dates in our Dynamics 365 app. We have tried many methods and it still would not work.
Behavior 1: The page keeps on refreshing and getting stuck on entering the Start Time, it seems like it is not even reaching the End Time field and entering data:
Behavior 2: It can enter both the Start Time and End Time in chronological order, however it takes multiple attempts to do so, in weird ways (for example, entering "2021-10-22" immediately after entering "2021/10/22" in the same entry field):
Error Message in Visual Studio:
Test method Microsoft.Dynamics365.UIAutomation.Sample.UCI.Create.CreateBasicInfo.UCICreateBooking threw exception: System.InvalidOperationException: Timeout after 10 seconds. Expected: 2021-10-22. Actual: 2021/10/22
Special formatting / display
Code to reproduce
We have tried a variety of formats, they all do not work:
Attempt 1: Using
SetValue(string field, string value)
Attempt 2: Using
SetValue(string field, DateTime date, string formatDate = null, string formatTime = null)
Attempt 3: Using
SetValue(DateTimeControl control)
Attempt 4: Using
ThinkTime()
before setting the values, and then after setting the values. For example this code snippet below. Have tried this for all the methods above with no luckAttempt 5: Putting hours and minutes in the format, for example:
Expected behavior
Assuming End Time > Start Time.
The page and date picker should not keep on looping/refreshing when entering the 2 dates. One a date is entered, it should move on to the next step (i.e. once Start Time is entered it should move on to End Time, and once End Time is entered it should save the form).
Screenshots
Please refer to the GIFs and code snippets above.
Additional context
Please refer to the "Code to reproduce" section above to see the methods we have tried.