forked from microsoft/EasyRepro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Rebuild FormJS Class Structure - Add Method xrmApp.Entity.IsTabVisible - Change Default Command Options for More Time / Retries / not thows exection without retry
- Loading branch information
1 parent
9099219
commit aaa0470
Showing
19 changed files
with
266 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
Microsoft.Dynamics365.UIAutomation.Api.UCI/Elements/FormJSWorker.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<TResult> ExecuteJS<T, TResult>(string commandName, string code, Func<T, TResult> converter) | ||
{ | ||
if (converter == null) | ||
throw new ArgumentNullException(nameof(converter)); | ||
|
||
return _worker.Execute(_worker.GetOptions(commandName), driver => | ||
{ | ||
driver.WaitForPageToLoad(); | ||
|
||
T result = driver.ExecuteJavaScript<T>(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; | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ics365.UIAutomation.Api.UCI/Microsoft.Dynamics365.UIAutomation.Api.UCI.csproj.DotSettings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=elements/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.