From a08fb399a7626af92a339e4585348b431563cb86 Mon Sep 17 00:00:00 2001 From: "Angel A. Rodriguez" Date: Wed, 6 Nov 2019 14:13:37 +0100 Subject: [PATCH] Enable & Disable a Attribute Control via FormJS + Load a WebResource --- .../Elements/FormJS.cs | 4 ++ ...ft.Dynamics365.UIAutomation.Api.UCI.csproj | 3 ++ .../Properties/AssemblyInfo.cs | 4 +- .../Pages/FormJS.cs | 46 ++++++++++++++++++- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- 7 files changed, 60 insertions(+), 9 deletions(-) diff --git a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJS.cs b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJS.cs index 1cb7a2e5..a9ed2b28 100644 --- a/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJS.cs +++ b/Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJS.cs @@ -16,6 +16,7 @@ public FormJS(WebClient client) } public BrowserCommandResult ExecuteJS(string commandName, string code, Func converter) => _page.ExecuteJS(commandName, code, converter); + public bool ExecuteJS(string code, params object[] args) => _page.ExecuteJS( code, args); 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); @@ -26,5 +27,8 @@ public FormJS(WebClient client) public BrowserCommandResult IsControlVisible(string attributte) => _page.IsControlVisible(attributte); public BrowserCommandResult IsDirty(string attributte) => _page.IsDirty(attributte); public BrowserCommandResult GetRequiredLevel(string attributte) => _page.GetRequiredLevel(attributte); + public bool Enable(string attributte) => _page.Enable(attributte); + public bool Disable(string attributte) => _page.Disable(attributte); + public bool LoadWebResource(string webResourceName, bool async = true) => _page.LoadWebResource(webResourceName, async); } } 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 69f28e75..39c1bb35 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 @@ -109,6 +109,9 @@ + + copy C:\~Projects\contributions\EasyRepro\Microsoft.Dynamics365.UIAutomation.Api.UCI\bin\Debug\Microsoft.Dynamics365.UIAutomation.* C:\~Projects\RailCargo\Tests\ORBIS.Rcg.UI.Tests\libs /Y +