@@ -2696,13 +2696,6 @@ private bool TrySetValue(IWebDriver driver, ISearchContext container, DateTimeCo
2696
2696
TrySetDateValue ( driver , container , control , formContext ) ;
2697
2697
TrySetTime ( driver , container , control , formContext ) ;
2698
2698
2699
- if ( container is IWebElement parent )
2700
- {
2701
- parent . Click ( true ) ;
2702
- parent . SendKeys ( Keys . Escape ) ; // Close Calendar
2703
- parent . SendKeys ( Keys . Escape ) ; // Close Header control
2704
- }
2705
-
2706
2699
TryCloseHeaderFlyout ( driver ) ;
2707
2700
2708
2701
return true ;
@@ -2790,27 +2783,27 @@ private static void TrySetTime(IWebDriver driver, ISearchContext container, Date
2790
2783
//IWebDriver formContext;
2791
2784
// Initialize the quick create form context
2792
2785
// If this is not done -- element input will go to the main form due to new flyout design
2793
- formContext = container . WaitUntilAvailable ( By . XPath ( AppElements . Xpath [ AppReference . QuickCreate . QuickCreateFormContext ] ) ) ;
2786
+ formContext = container . WaitUntilAvailable ( By . XPath ( AppElements . Xpath [ AppReference . QuickCreate . QuickCreateFormContext ] ) , new TimeSpan ( 0 , 0 , 1 ) ) ;
2794
2787
}
2795
2788
else if ( formContextType == FormContextType . Entity )
2796
2789
{
2797
2790
// Initialize the entity form context
2798
- formContext = container . WaitUntilAvailable ( By . XPath ( AppElements . Xpath [ AppReference . Entity . FormContext ] ) ) ;
2791
+ formContext = container . WaitUntilAvailable ( By . XPath ( AppElements . Xpath [ AppReference . Entity . FormContext ] ) , new TimeSpan ( 0 , 0 , 1 ) ) ;
2799
2792
}
2800
2793
else if ( formContextType == FormContextType . BusinessProcessFlow )
2801
2794
{
2802
2795
// Initialize the Business Process Flow context
2803
- formContext = container . WaitUntilAvailable ( By . XPath ( AppElements . Xpath [ AppReference . BusinessProcessFlow . BusinessProcessFlowFormContext ] ) ) ;
2796
+ formContext = container . WaitUntilAvailable ( By . XPath ( AppElements . Xpath [ AppReference . BusinessProcessFlow . BusinessProcessFlowFormContext ] ) , new TimeSpan ( 0 , 0 , 1 ) ) ;
2804
2797
}
2805
2798
else if ( formContextType == FormContextType . Header )
2806
2799
{
2807
2800
// Initialize the Header context
2808
- formContext = container . WaitUntilAvailable ( By . XPath ( AppElements . Xpath [ AppReference . Entity . HeaderContext ] ) ) ;
2801
+ formContext = container as IWebElement ;
2809
2802
}
2810
2803
else if ( formContextType == FormContextType . Dialog )
2811
2804
{
2812
2805
// Initialize the Header context
2813
- formContext = container . WaitUntilAvailable ( By . XPath ( AppElements . Xpath [ AppReference . Dialogs . DialogContext ] ) ) ;
2806
+ formContext = container . WaitUntilAvailable ( By . XPath ( AppElements . Xpath [ AppReference . Dialogs . DialogContext ] ) , new TimeSpan ( 0 , 0 , 1 ) ) ;
2814
2807
}
2815
2808
2816
2809
var success = formContext . TryFindElement ( timeFieldXPath , out var timeField ) ;
@@ -2831,6 +2824,7 @@ private static void TrySetTime(IWebDriver driver, IWebElement timeField, string
2831
2824
timeField . Click ( ) ;
2832
2825
timeField . SendKeys ( time ) ;
2833
2826
timeField . SendKeys ( Keys . Tab ) ;
2827
+ driver . WaitForTransaction ( ) ;
2834
2828
} ,
2835
2829
d => timeField . GetAttribute ( "value" ) . IsValueEqualsTo ( time ) ,
2836
2830
TimeSpan . FromSeconds ( 9 ) , 3 ,
0 commit comments