diff --git a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/Entity.cs b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/Entity.cs index cdadcc1b..4176e6b6 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/Entity.cs +++ b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/Entity.cs @@ -303,6 +303,13 @@ public void SelectTab(string tabName, string subTabName = "") _client.SelectTab(tabName, subTabName); } + /// + /// Opens any tab on the web page. + /// + /// The name of the tab based on the References class + public BrowserCommandResult IsTabVisible(string tabName) => _client.IsTabVisible(tabName); + + public void SetHeaderValue(string field, string value) { _client.SetHeaderValue(field, value); diff --git a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJS.cs b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJS.cs index 851897e3..1cb7a2e5 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJS.cs +++ b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJS.cs @@ -6,24 +6,25 @@ namespace Microsoft.Dynamics365.UIAutomation.Api.UCI { public class FormJS : Element { - private readonly FormJSPage _worker; + private readonly FormJSWorker _worker; + private readonly Pages.FormJS _page; public FormJS(WebClient client) { - _worker = new FormJSPage(client.Browser); + _worker = new FormJSWorker(client); + _page = new Pages.FormJS(_worker); } + + public BrowserCommandResult ExecuteJS(string commandName, string code, Func converter) => _page.ExecuteJS(commandName, code, converter); + public bool ExecuteJS(string commandName, string code, params object[] args) => _page.ExecuteJS(commandName, code, args); + public BrowserCommandResult ExecuteJS(string commandName, string code) => _page.ExecuteJS(commandName, code); - public BrowserCommandOptions GetOptions(string commandName) => _worker.GetOptions(commandName); - public bool SwitchToContent() => _worker.SwitchToContent(); - public BrowserCommandResult GetAttributeValue(string attributte) => _worker.GetAttributeValue(attributte); - public bool SetAttributeValue(string attributte, T value) => _worker.SetAttributeValue(attributte, value); - public bool Clear(string attribute) => _worker.Clear(attribute); - public BrowserCommandResult GetEntityId() => _worker.GetEntityId(); - public BrowserCommandResult IsControlVisible(string attributte) => _worker.IsControlVisible(attributte); - public BrowserCommandResult IsDirty(string attributte) => _worker.IsDirty(attributte); - public BrowserCommandResult GetRequiredLevel(string attributte) => _worker.GetRequiredLevel(attributte); - public BrowserCommandResult ExecuteJS(string commandName, string code) => _worker.ExecuteJS(commandName, code); - public BrowserCommandResult ExecuteJS(string commandName, string code, Func converter) => _worker.ExecuteJS(commandName, code, converter); - public bool ExecuteJS(string commandName, string code, params object[] args) => _worker.ExecuteJS(commandName, code, args); + public BrowserCommandResult GetAttributeValue(string attributte) => _page.GetAttributeValue(attributte); + public bool SetAttributeValue(string attributte, T value) => _page.SetAttributeValue(attributte, value); + public bool Clear(string attribute) => _page.Clear(attribute); + public BrowserCommandResult GetEntityId() => _page.GetEntityId(); + public BrowserCommandResult IsControlVisible(string attributte) => _page.IsControlVisible(attributte); + public BrowserCommandResult IsDirty(string attributte) => _page.IsDirty(attributte); + public BrowserCommandResult GetRequiredLevel(string attributte) => _page.GetRequiredLevel(attributte); } } diff --git a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJSWorker.cs b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJSWorker.cs new file mode 100644 index 00000000..b4efca42 --- /dev/null +++ b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJSWorker.cs @@ -0,0 +1,45 @@ +// Created by: Rodriguez Mustelier Angel -- +// Modify On: 2019-10-21 04:20 + +using System; +using Microsoft.Dynamics365.UIAutomation.Api.Pages; +using Microsoft.Dynamics365.UIAutomation.Browser; +using OpenQA.Selenium.Support.Extensions; + +namespace Microsoft.Dynamics365.UIAutomation.Api.UCI +{ + public class FormJSWorker : Element, IFormJSWorker + { + private readonly Pages.FormJSWorker _worker; + + public FormJSWorker(WebClient client) + { + _worker = new Pages.FormJSWorker(client.Browser); + } + + public BrowserCommandResult ExecuteJS(string commandName, string code, Func converter) + { + if (converter == null) + throw new ArgumentNullException(nameof(converter)); + + return _worker.Execute(_worker.GetOptions(commandName), driver => + { + driver.WaitForPageToLoad(); + + T result = driver.ExecuteJavaScript(code); + return converter(result); + }); + } + + public bool ExecuteJS(string commandName, string code, params object[] args) + { + return _worker.Execute(_worker.GetOptions(commandName), driver => + { + driver.WaitForPageToLoad(); + + driver.ExecuteJavaScript(code, args); + return true; + }); + } + } +} \ No newline at end of file diff --git a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Extensions/EntityExtensions.cs b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Extensions/EntityExtensions.cs index c37b06e8..097daf1d 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Extensions/EntityExtensions.cs +++ b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Extensions/EntityExtensions.cs @@ -7,11 +7,10 @@ public static class EntityExtensions public static BrowserCommandResult GetLookupValue(this Entity entity, string attribute) => entity.GetValue(new LookupItem {Name = attribute}); - public static void SetLookupValue(this Entity entity, string attribute, string value) - { - entity.SetValue(attribute, value); - entity.SelectLookup(new LookupItem{ Name = attribute, Index = 0}); - } - + public static void SetLookupValue(this Entity entity, string attribute, string value) => + entity.SetValue(new LookupItem { Name = attribute, Value = value }); + + public static void ClearLookup(this Entity entity, string attribute) => + entity.RemoveValues(new []{new LookupItem{ Name = attribute }}); } } \ No newline at end of file diff --git a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Microsoft.Dynamics365.UIAutomation.Api.UCI.csproj b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Microsoft.Dynamics365.UIAutomation.Api.UCI.csproj index 6b07a395..69f28e75 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Microsoft.Dynamics365.UIAutomation.Api.UCI.csproj +++ b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Microsoft.Dynamics365.UIAutomation.Api.UCI.csproj @@ -67,6 +67,7 @@ + diff --git a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Microsoft.Dynamics365.UIAutomation.Api.UCI.csproj.DotSettings b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Microsoft.Dynamics365.UIAutomation.Api.UCI.csproj.DotSettings new file mode 100644 index 00000000..a919b6bc --- /dev/null +++ b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Microsoft.Dynamics365.UIAutomation.Api.UCI.csproj.DotSettings @@ -0,0 +1,2 @@ + + True \ No newline at end of file diff --git a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Properties/AssemblyInfo.cs b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Properties/AssemblyInfo.cs index 09980f5e..c2af2d5e 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Properties/AssemblyInfo.cs +++ b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.19282.1411")] -[assembly: AssemblyFileVersion("1.0.19282.1411")] +[assembly: AssemblyVersion("1.0.19295.1032")] +[assembly: AssemblyFileVersion("1.0.19295.1032")] diff --git a/Microsoft.Dynamics365.UIAutomation.Api.UCI/WebClient.cs b/Microsoft.Dynamics365.UIAutomation.Api.UCI/WebClient.cs index 4c723cbd..e1ad77ad 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api.UCI/WebClient.cs +++ b/Microsoft.Dynamics365.UIAutomation.Api.UCI/WebClient.cs @@ -6,7 +6,6 @@ using OpenQA.Selenium.Support.UI; using System; using System.Collections.Generic; -using System.Collections.Specialized; using System.Linq; using System.Security; using System.Threading; @@ -28,10 +27,10 @@ internal BrowserCommandOptions GetOptions(string commandName) { return new BrowserCommandOptions(Constants.DefaultTraceSource, commandName, - 0, - 0, + Constants.DefaultRetryAttempts, + Constants.DefaultRetryDelay, null, - true, + false, typeof(NoSuchElementException), typeof(StaleElementReferenceException)); } @@ -1798,7 +1797,7 @@ internal BrowserCommandResult SetValue(LookupItem control, int index = 0) { return this.Execute(GetOptions($"Set Lookup Value: {control.Name}"), driver => { - driver.WaitForTransaction(5); + driver.WaitForTransaction(120); var fieldContainer = driver.WaitUntilAvailable(By.XPath(AppElements.Xpath[AppReference.Entity.TextFieldLookupFieldContainer].Replace("[NAME]", control.Name))); @@ -1814,11 +1813,14 @@ internal BrowserCommandResult SetValue(LookupItem control, int index = 0) input.SendKeys(Keys.Backspace); input.SendKeys(control.Value, true); - driver.ClickWhenAvailable(By.XPath(AppElements.Xpath[AppReference.Entity.TextFieldLookupSearchButton].Replace("[NAME]", control.Name))); + var byXPath = By.XPath(AppElements.Xpath[AppReference.Entity.TextFieldLookupSearchButton].Replace("[NAME]", control.Name)); + driver.WaitUntilVisible(byXPath); + + driver.ClickWhenAvailable(byXPath); driver.WaitForTransaction(); } - if (control.Value != null && control.Value != "") + if (!string.IsNullOrEmpty(control.Value)) { SetLookUpByValue(driver, control, index); } @@ -3317,8 +3319,7 @@ internal void ClickTab(IWebElement tabList, string xpath, string name) searchScope = Browser.Driver.FindElement(By.XPath(AppElements.Xpath[AppReference.Entity.MoreTabsMenu])); } - - if (searchScope.TryFindElement(By.XPath(string.Format(xpath, name)), out IWebElement listItem)) + if (searchScope != null && searchScope.TryFindElement(By.XPath(string.Format(xpath, name)), out IWebElement listItem)) { listItem.Click(true); } @@ -3326,7 +3327,53 @@ internal void ClickTab(IWebElement tabList, string xpath, string name) { throw new Exception($"The tab with name: {name} does not exist"); } - + } + + /// True on success, Exception on failure to invoke any action + internal BrowserCommandResult IsTabVisible(string tabName, string subTabName = "", int thinkTime = Constants.DefaultThinkTime) + { + Browser.ThinkTime(thinkTime); + + return Execute("Is Tab Visible", driver => + { + IWebElement tabList = driver.WaitUntilAvailable(By.XPath(AppElements.Xpath[AppReference.Entity.TabList])); + if (tabList == null) + return false; + + bool result; + //Click Sub Tab if provided + if (string.IsNullOrEmpty(subTabName)) + { + result = IsTabVisible(tabList, AppElements.Xpath[AppReference.Entity.Tab], tabName); + } + else + { + ClickTab(tabList, AppElements.Xpath[AppReference.Entity.Tab], tabName); + result = IsTabVisible(tabList, AppElements.Xpath[AppReference.Entity.SubTab], subTabName); + } + return result; + }); + } + + + internal bool IsTabVisible(IWebElement tabList, string xpath, string name) + { + // Look for the tab in the tab list, else in the more tabs menu + IWebElement searchScope = null; + if(tabList.HasElement(By.XPath(string.Format(xpath, name)))) + { + searchScope = tabList; + + } + else if(tabList.TryFindElement(By.XPath(AppElements.Xpath[AppReference.Entity.MoreTabs]), out IWebElement moreTabsButton)) + { + moreTabsButton.Click(); + searchScope = Browser.Driver.FindElement(By.XPath(AppElements.Xpath[AppReference.Entity.MoreTabsMenu])); + } + + IWebElement listItem = null; + var result = searchScope != null && searchScope.TryFindElement(By.XPath(string.Format(xpath, name)), out listItem); + return result && listItem != null; } /// diff --git a/Microsoft.Dynamics365.UIAutomation.Api/Microsoft.Dynamics365.UIAutomation.Api.csproj b/Microsoft.Dynamics365.UIAutomation.Api/Microsoft.Dynamics365.UIAutomation.Api.csproj index b5a3cd05..e858df55 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api/Microsoft.Dynamics365.UIAutomation.Api.csproj +++ b/Microsoft.Dynamics365.UIAutomation.Api/Microsoft.Dynamics365.UIAutomation.Api.csproj @@ -82,6 +82,8 @@ + + diff --git a/Microsoft.Dynamics365.UIAutomation.Api/Pages/Entity.cs b/Microsoft.Dynamics365.UIAutomation.Api/Pages/Entity.cs index e3e1d662..bc6ed336 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api/Pages/Entity.cs +++ b/Microsoft.Dynamics365.UIAutomation.Api/Pages/Entity.cs @@ -686,7 +686,7 @@ public BrowserCommandResult CollapseTab(string name, int thinkTime = Const return this.Execute(GetOptions($"Collapse Tab: {name}"), driver => { - if (!driver.HasElement(By.XPath(Elements.Xpath[Reference.Entity.Tab].Replace("[NAME]", name)))) + if (!IsTabVisible(driver, name)) { throw new InvalidOperationException($"Tab with name '{name}' does not exist."); } @@ -720,6 +720,19 @@ public BrowserCommandResult DismissAlertIfPresent(bool stay = false) }); } + /// + /// Expands the Tab on a CRM Entity form. + /// + /// The name of the Tab. + /// Used to simulate a wait time between human interactions. The Default is 2 seconds. + /// xrmBrowser.Entity.ExpandTab("Summary"); + public BrowserCommandResult IsTabVisible(string name, int thinkTime = Constants.DefaultThinkTime) + { + Browser.ThinkTime(thinkTime); + + return Execute(GetOptions($"Is Tab Visible: {name}"), driver => IsTabVisible(driver, name)); + } + /// /// Expands the Tab on a CRM Entity form. /// @@ -732,7 +745,7 @@ public BrowserCommandResult ExpandTab(string name, int thinkTime = Constan return this.Execute(GetOptions($"Expand Tab: {name}"), driver => { - if (!driver.HasElement(By.XPath(Elements.Xpath[Reference.Entity.Tab].Replace("[NAME]", name)))) + if (IsTabVisible(driver, name)) { throw new InvalidOperationException($"Tab with name '{name}' does not exist."); } @@ -745,6 +758,12 @@ public BrowserCommandResult ExpandTab(string name, int thinkTime = Constan }); } + + private static bool IsTabVisible(IWebDriver driver, string name) + { + return driver.HasElement(By.XPath(Elements.Xpath[Reference.Entity.Tab].Replace("[NAME]", name))); + } + /// /// Gets the value of a Text/Description field on an Entity footer. /// diff --git a/Microsoft.Dynamics365.UIAutomation.Api/Pages/FormJS.cs b/Microsoft.Dynamics365.UIAutomation.Api/Pages/FormJS.cs index da70c4d7..a0792e51 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api/Pages/FormJS.cs +++ b/Microsoft.Dynamics365.UIAutomation.Api/Pages/FormJS.cs @@ -1,42 +1,31 @@ using System; using Microsoft.Dynamics365.UIAutomation.Browser; -using OpenQA.Selenium; -using OpenQA.Selenium.Support.Extensions; namespace Microsoft.Dynamics365.UIAutomation.Api.Pages { public class FormJS : BrowserPage { + private readonly IFormJSWorker _worker; + public FormJS(InteractiveBrowser browser) : base(browser) - { } - - public BrowserCommandOptions GetOptions(string commandName) { - return new BrowserCommandOptions(Constants.DefaultTraceSource, - commandName, - 0, - 0, - null, - true, - typeof(NoSuchElementException), typeof(StaleElementReferenceException)); + _worker = new FormJSWorker(browser); } - public bool SwitchToContent() + public FormJS(IFormJSWorker worker) { - Browser.Driver.SwitchTo().DefaultContent(); - //wait for the content panel to render - Browser.Driver.WaitUntilAvailable(By.XPath(Elements.Xpath[Reference.Frames.ContentPanel])); - - //find the crmContentPanel and find out what the current content frame ID is - then navigate to the current content frame - var currentContentFrame = Browser.Driver.FindElement(By.XPath(Elements.Xpath[Reference.Frames.ContentPanel])) - .GetAttribute(Elements.ElementId[Reference.Frames.ContentFrameId]); - - Browser.Driver.SwitchTo().Frame(currentContentFrame); - - return true; + _worker = worker; } + public BrowserCommandResult ExecuteJS(string commandName, string code, Func converter) + => _worker.ExecuteJS(commandName, code, converter); + public bool ExecuteJS(string commandName, string code, params object[] args) + => _worker.ExecuteJS(commandName, code, args); + + public BrowserCommandResult ExecuteJS(string commandName, string code) + => ExecuteJS(commandName, code, result => result); + public BrowserCommandResult GetAttributeValue(string attributte) { var commandName = $"Get Attribute Value via Form JS: {attributte}"; @@ -104,32 +93,5 @@ public BrowserCommandResult GetRequiredLevel(string attributte) }); } - - public BrowserCommandResult ExecuteJS(string commandName, string code) => ExecuteJS(commandName, code, result => result); - - public BrowserCommandResult ExecuteJS(string commandName, string code, Func converter) - { - if (converter == null) - throw new ArgumentNullException(nameof(converter)); - - return Execute(GetOptions(commandName), driver => - { - SwitchToContent(); - - T result = driver.ExecuteJavaScript(code); - return converter(result); - }); - } - - public bool ExecuteJS(string commandName, string code, params object[] args) - { - return Execute(GetOptions(commandName), driver => - { - SwitchToContent(); - - driver.ExecuteJavaScript(code, args); - return true; - }); - } } } diff --git a/Microsoft.Dynamics365.UIAutomation.Api/Pages/FormJSWorker.cs b/Microsoft.Dynamics365.UIAutomation.Api/Pages/FormJSWorker.cs new file mode 100644 index 00000000..edd19d17 --- /dev/null +++ b/Microsoft.Dynamics365.UIAutomation.Api/Pages/FormJSWorker.cs @@ -0,0 +1,68 @@ +// Created by: Rodriguez Mustelier Angel -- +// Modify On: 2019-10-21 03:59 + +using System; +using Microsoft.Dynamics365.UIAutomation.Browser; +using OpenQA.Selenium; +using OpenQA.Selenium.Support.Extensions; + +namespace Microsoft.Dynamics365.UIAutomation.Api.Pages +{ + public class FormJSWorker : BrowserPage, IFormJSWorker + { + public FormJSWorker(InteractiveBrowser browser) + : base(browser) + { } + + public BrowserCommandOptions GetOptions(string commandName) + { + return new BrowserCommandOptions(Constants.DefaultTraceSource, + commandName, + 0, + 0, + null, + true, + typeof(NoSuchElementException), typeof(StaleElementReferenceException)); + } + + public bool SwitchToContent() + { + Browser.Driver.SwitchTo().DefaultContent(); + //wait for the content panel to render + Browser.Driver.WaitUntilAvailable(By.XPath(Elements.Xpath[Reference.Frames.ContentPanel])); + + //find the crmContentPanel and find out what the current content frame ID is - then navigate to the current content frame + var currentContentFrame = Browser.Driver.FindElement(By.XPath(Elements.Xpath[Reference.Frames.ContentPanel])) + .GetAttribute(Elements.ElementId[Reference.Frames.ContentFrameId]); + + Browser.Driver.SwitchTo().Frame(currentContentFrame); + + return true; + } + + public BrowserCommandResult ExecuteJS(string commandName, string code, Func converter) + { + if (converter == null) + throw new ArgumentNullException(nameof(converter)); + + return Execute(GetOptions(commandName), driver => + { + SwitchToContent(); + + T result = driver.ExecuteJavaScript(code); + return converter(result); + }); + } + + public bool ExecuteJS(string commandName, string code, params object[] args) + { + return Execute(GetOptions(commandName), driver => + { + SwitchToContent(); + + driver.ExecuteJavaScript(code, args); + return true; + }); + } + } +} \ No newline at end of file diff --git a/Microsoft.Dynamics365.UIAutomation.Api/Pages/IFormJSWorker.cs b/Microsoft.Dynamics365.UIAutomation.Api/Pages/IFormJSWorker.cs new file mode 100644 index 00000000..0fce2bca --- /dev/null +++ b/Microsoft.Dynamics365.UIAutomation.Api/Pages/IFormJSWorker.cs @@ -0,0 +1,14 @@ +// Created by: Rodriguez Mustelier Angel -- +// Modify On: 2019-10-21 04:00 + +using System; +using Microsoft.Dynamics365.UIAutomation.Browser; + +namespace Microsoft.Dynamics365.UIAutomation.Api.Pages +{ + public interface IFormJSWorker + { + bool ExecuteJS(string commandName, string code, params object[] args); + BrowserCommandResult ExecuteJS(string commandName, string code, Func converter); + } +} \ No newline at end of file diff --git a/Microsoft.Dynamics365.UIAutomation.Api/Properties/AssemblyInfo.cs b/Microsoft.Dynamics365.UIAutomation.Api/Properties/AssemblyInfo.cs index 57120918..0f19d19f 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api/Properties/AssemblyInfo.cs +++ b/Microsoft.Dynamics365.UIAutomation.Api/Properties/AssemblyInfo.cs @@ -21,6 +21,6 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("dfe2c141-f1aa-4d4b-8df8-0fb93023cf45")] -[assembly: AssemblyVersion("8.2.19282.1411")] -[assembly: AssemblyFileVersion("8.2.19282.1411")] +[assembly: AssemblyVersion("8.2.19295.0952")] +[assembly: AssemblyFileVersion("8.2.19295.0952")] diff --git a/Microsoft.Dynamics365.UIAutomation.Browser/Constants.cs b/Microsoft.Dynamics365.UIAutomation.Browser/Constants.cs index a234175e..efb8ad88 100644 --- a/Microsoft.Dynamics365.UIAutomation.Browser/Constants.cs +++ b/Microsoft.Dynamics365.UIAutomation.Browser/Constants.cs @@ -10,18 +10,18 @@ public static partial class Constants /// /// The default amount of time to wait for an operation to complete by the Selenium driver. /// - public static readonly TimeSpan DefaultTimeout = new TimeSpan(0, 0, 30); + public static readonly TimeSpan DefaultTimeout = new TimeSpan(0, 3, 0); /// /// The default amount of time to wait between retrying command executions if they fail. /// Value is expressed in miliseconds. /// - public const int DefaultRetryDelay = 5000; + public const int DefaultRetryDelay = 10000; /// /// The default number of retry attempts for a command execution if it fails. /// - public const int DefaultRetryAttempts = 2; + public const int DefaultRetryAttempts = 5; /// /// The default page to direct a user to if none other is specified. @@ -36,7 +36,7 @@ public static partial class Constants /// /// The default tracing source for browser automation. /// - public const int DefaultThinkTime = 2000; + public const int DefaultThinkTime = 5000; /// /// Constants and defaults related to the InteractiveBrowser. diff --git a/Microsoft.Dynamics365.UIAutomation.Browser/Extensions/SeleniumExtensions.cs b/Microsoft.Dynamics365.UIAutomation.Browser/Extensions/SeleniumExtensions.cs index ddb3c584..19153590 100644 --- a/Microsoft.Dynamics365.UIAutomation.Browser/Extensions/SeleniumExtensions.cs +++ b/Microsoft.Dynamics365.UIAutomation.Browser/Extensions/SeleniumExtensions.cs @@ -409,12 +409,13 @@ public static bool WaitFor(this IWebDriver driver, Predicate predica public static bool WaitForPageToLoad(this IWebDriver driver) { - return WaitForPageToLoad(driver, Constants.DefaultTimeout.Seconds); + return WaitForPageToLoad(driver, (int) Constants.DefaultTimeout.TotalSeconds); } public static bool WaitForTransaction(this IWebDriver driver) { - return WaitForTransaction(driver, Constants.DefaultTimeout.Seconds); + var seconds = (int) Constants.DefaultTimeout.TotalSeconds; + return WaitForTransaction(driver, seconds); } //public static bool WaitForPageToLoad(this IWebDriver driver, TimeSpan timeout) @@ -486,7 +487,7 @@ public static bool WaitForTransaction(this IWebDriver driver, int maxWaitTimeInS try { //Poll every half second to see if UCI is idle - WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(500)); + WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(maxWaitTimeInSeconds)); wait.Until(d => { try diff --git a/Microsoft.Dynamics365.UIAutomation.Browser/Properties/AssemblyInfo.cs b/Microsoft.Dynamics365.UIAutomation.Browser/Properties/AssemblyInfo.cs index 10c4febf..2d733336 100644 --- a/Microsoft.Dynamics365.UIAutomation.Browser/Properties/AssemblyInfo.cs +++ b/Microsoft.Dynamics365.UIAutomation.Browser/Properties/AssemblyInfo.cs @@ -21,6 +21,6 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("c9748803-f3cb-4531-b313-bc24d4d0bf0c")] -[assembly: AssemblyVersion("8.2.19282.1411")] -[assembly: AssemblyFileVersion("8.2.19282.1411")] +[assembly: AssemblyVersion("8.2.19294.1302")] +[assembly: AssemblyFileVersion("8.2.19294.1302")] diff --git a/Microsoft.Dynamics365.UIAutomation.Sample/Properties/AssemblyInfo.cs b/Microsoft.Dynamics365.UIAutomation.Sample/Properties/AssemblyInfo.cs index f178d8a2..bff0af34 100644 --- a/Microsoft.Dynamics365.UIAutomation.Sample/Properties/AssemblyInfo.cs +++ b/Microsoft.Dynamics365.UIAutomation.Sample/Properties/AssemblyInfo.cs @@ -21,6 +21,6 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("a075b87e-dca5-4a2a-909b-932e2f5f98b4")] -[assembly: AssemblyVersion("8.2.19282.2127")] -[assembly: AssemblyFileVersion("8.2.19282.2127")] +[assembly: AssemblyVersion("8.2.19295.1032")] +[assembly: AssemblyFileVersion("8.2.19295.1032")] diff --git a/Microsoft.Dynamics365.UIAutomation.Sample/app.config b/Microsoft.Dynamics365.UIAutomation.Sample/app.config deleted file mode 100644 index 9c3c6bc6..00000000 --- a/Microsoft.Dynamics365.UIAutomation.Sample/app.config +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -