Skip to content

Commit

Permalink
Update for Performance Center Page name (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtu11 authored Jul 3, 2020
1 parent a501e90 commit 06ca9b1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void TrackPerformanceEvents(Dictionary<string, string> additionalProperti
ShowHidePerformanceWidget();

Dictionary<string, string> metadata = GetMetadataMarkers();
Dictionary<string, double> markers = GetPerformanceMarkers(metadata["PageName"]);
Dictionary<string, double> markers = GetPerformanceMarkers(GetRecentPageName());

ShowHidePerformanceWidget();

Expand Down Expand Up @@ -123,6 +123,10 @@ internal void TrackEvents(string eventName, Dictionary<string, string> propertie
telemetry = null;
}

internal string GetRecentPageName()
{
return _client.Browser.Driver.FindElement(By.XPath("//div[@data-id='performance-widget']//div[contains(@style, '253, 253, 253')]/span[1]")).Text;
}
internal Dictionary<string, double> GetPerformanceMarkers(string page)
{
SelectPerformanceWidgetPage(page);
Expand Down

0 comments on commit 06ca9b1

Please sign in to comment.