public IEnumerable<TrafficItem> GetTraffic()
Return Value
Type: System.Collections.IEnumerable
Collection of requests.
public IEnumerable<TrafficItem> GetTraffic()
Type: System.Collections.IEnumerable
Collection of requests.
// navigate to url instance.ActiveTab.Navigate("http://lessons.zennolab.com"); // get list of requests var list = instance.ActiveTab.GetTraffic(); // print count of items, it will be more than 0 project.SendInfoToLog("First count of traffic elements = " + list.Count()); // get some data from items and log it foreach(var t in list) project.SendInfoToLog(string.Format("Url: {0}\r\n Method: {1}\r\n Result: {2}", t.Url, t.Method, t.ResultCode), true); // get list of request second time var list2 = instance.ActiveTab.GetTraffic(); // print count of items, it will be 0, because the previous method call removed the old items project.SendInfoToLog("Second count of traffic elements = " + list2.Count());
Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.