Skip to content

Commit

Permalink
Merging changes from develop into v9.1 (#500)
Browse files Browse the repository at this point in the history
* Merging alpha branch with new develop branch (#457)

* Adding support for Azure DevOps build testing

* Merging UCI Nav Changes (#453)

* Changes for Forcing UCI from Main.aspx

* Updates

* Committing

* Changes for Missing Switcher in SiteMap

* Remove project

* Delete Documentation.csproj

* Delete Program.cs

* Delete App.config

* Delete AssemblyInfo.cs

* Delete app.config

* Updated App.Config

* App.Config

* Revert "Merging UCI Nav Changes (#453)" (#454)

This reverts commit 88d60cd.

* Perf Enhancement to OpenSubArea (#458)

* Merging alpha branch with new develop branch (#457)

* Adding support for Azure DevOps build testing

* Merging UCI Nav Changes (#453)

* Changes for Forcing UCI from Main.aspx

* Updates

* Committing

* Changes for Missing Switcher in SiteMap

* Remove project

* Delete Documentation.csproj

* Delete Program.cs

* Delete App.config

* Delete AssemblyInfo.cs

* Delete app.config

* Updated App.Config

* App.Config

* Revert "Merging UCI Nav Changes (#453)" (#454)

This reverts commit 88d60cd.

* Adding WaitUntilAvailable to ensure the Timeline popout menu is both opened and clicked, allowing SetValue to work as expected. (#465)

* Update Grid.Search() method to match org sample data (#467)

* GitHub issues #404 and #380 Completing boolean Gets & Sets for all 3 field formats. Sorry this is a lot at once but I thought it made sense to keep it together (#483)

* GitHub issue #439 Fixed OpenEntity to open specified record instead of re-opening the current record (#484)

* GitHub issue #452 Added UCI  new method to use form selector to change forms (#486)

* Added support for remote execution (#475) (#493)

Added remote execution support for selenium grid for Firefox and Chrome web browsers. This is useful when you need to perform a large number of tests.

* Allows browser height & width to be set manualy to a larger size than the current resolution supports. (#476) (#494)

* Updated SetValue for lookup to use the parameter value to match in the dialog versus only looking at the immediate results. (#479) (#495)

Updated SelectLookup function to utilize previously unused parameter to prevent lookup dialog from opening after clearing the field.

* GitHub issues #394 & #7 Fixes issues with UCI fields not clearing or not removing previous value when updating (#481) (#496)

* GitHub issue #371 Updated SetValue for lookup. Added a WaitForTransaction to ensure the page is loaded to prevent issue with SetValue executing when the load is still happening. Added sleeps to make sure the elements get hovered & clicked properly (#480) (#497)

* Merge into v91
  • Loading branch information
TYLEROL committed May 22, 2019
1 parent 4da3483 commit 180d310
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 36 deletions.
38 changes: 3 additions & 35 deletions Microsoft.Dynamics365.UIAutomation.Api.UCI/WebClient.cs
Expand Up @@ -1436,17 +1436,11 @@ internal BrowserCommandResult<bool> OpenEntity(string entityName, Guid id, int t

return this.Execute(GetOptions($"Open: {entityName} {id}"), driver =>
{
//retrieve the appId from the current Uri
string appId = HttpUtility.ParseQueryString(new Uri(driver.Url).Query).Get("appid");
Guid guid = Guid.Empty;
if (!Guid.TryParse(appId, out guid))
throw new InvalidOperationException("Unable to determine the appid for UCI");
//https:///main.aspx?appid=98d1cf55-fc47-e911-a97c-000d3ae05a70&pagetype=entityrecord&etn=lead&id=ed975ea3-531c-e511-80d8-3863bb3ce2c8
var uri = new Uri(this.Browser.Driver.Url);
var link = $"{uri.Scheme}://{uri.Authority}/main.aspx?appid={appId}&pagetype=entityrecord&etn={entityName}&id=%7B{id:D}%7D";
var qs = HttpUtility.ParseQueryString(uri.Query.ToLower());
var appId = qs.Get("appid");
var link = $"{uri.Scheme}://{uri.Authority}/main.aspx?appid={appId}&etn={entityName}&pagetype=entityrecord&id={id}";
driver.Navigate().GoToUrl(link);
Expand All @@ -1462,32 +1456,6 @@ internal BrowserCommandResult<bool> OpenEntity(string entityName, Guid id, int t
});
}

/// <summary>
/// Open Entity
/// </summary>
/// <param name="entityUri">The Uri of the entity</param>
/// <param name="thinkTime">The think time</param>
internal BrowserCommandResult<bool> OpenEntity(Uri entityUri, int thinkTime = Constants.DefaultThinkTime)
{
this.Browser.ThinkTime(thinkTime);

return this.Execute(GetOptions($"Open: {entityUri.AbsoluteUri}"), driver =>
{
driver.Navigate().GoToUrl(entityUri.AbsoluteUri);
//SwitchToContent();
driver.WaitForPageToLoad();
driver.WaitUntilClickable(By.XPath(Elements.Xpath[Reference.Entity.Form]),
new TimeSpan(0, 0, 30),
null,
d => { throw new Exception("CRM Record is Unavailable or not finished loading. Timeout Exceeded"); }
);
return true;
});
}

/// <summary>
/// Saves the entity
/// </summary>
Expand Down
Expand Up @@ -29,7 +29,7 @@ public void UCITestHighlightActiveAccount()

xrmApp.Navigation.OpenSubArea("Sales", "Accounts");

xrmApp.Grid.Search("04");
xrmApp.Grid.Search("Adventure");

xrmApp.Grid.HighLightRecord(0); //Ticks the box, allowing you to Edit / Delete (Command) if you so desire
xrmApp.CommandBar.ClickCommand("Edit");
Expand Down

0 comments on commit 180d310

Please sign in to comment.