public void Comps_S05_TC04_CanTryO365API_GetFiles() { ServiceToTry service = ServiceToTry.GetFiles; Pages.Office365Page.CardTryItOut.ChooseService(service); int currentWidth = 0; int currentHeight = 0; Browser.GetWindowSize(out currentWidth, out currentHeight); if (currentWidth > Utility.MinWidthToShowParam) { foreach (GetFilesValue item in Enum.GetValues(typeof(GetFilesValue))) { Pages.Office365Page.CardTryItOut.ChooseServiceValue(item); Pages.Office365Page.CardTryItOut.ClickTry(); Assert.IsTrue(Pages.Office365Page.CardTryItOut.CanGetResponse(item), string.Format("The service {0} with parameter {1} is not work.", service.ToString(), item.ToString())); Assert.IsTrue(Pages.Office365Page.CardTryItOut.UrlContainsParameterValue(), string.Format("The parameter {0} of service {1} is not contained in the url.", item.ToString(), service.ToString())); } } else { Pages.Office365Page.CardTryItOut.ClickTry(); Assert.IsTrue(Pages.Office365Page.CardTryItOut.CanGetResponse(GetFilesValue.drive_root_children), string.Format("The service {0} with parameter {1} is not work.", service.ToString(), GetFilesValue.drive_root_children.ToString())); Assert.IsTrue(Pages.Office365Page.CardTryItOut.UrlContainsParameterValue(), string.Format("The parameter {0} of service {1} is not contained in the url.", GetFilesValue.drive_root_children.ToString(), service.ToString())); } }