public void Comps_Graph_S07_TC01_CheckInThisArticle() { GraphPages.Navigation.Select("Documentation"); GraphBrowser.ZoomToPercent(50); GraphBrowser.Wait(TimeSpan.FromSeconds(3)); //In this article renders after the doc renders, so must wait Assert.IsTrue(GraphUtility.IsInThisArticleDisplayed(), "On a large screen, in this article should be displayed"); GraphBrowser.ZoomToPercent(100); Size windowSize; //Set as the screen size of IPad2 double deviceScreenSize = double.Parse(GraphUtility.GetConfigurationValue("IPad2Size")); GraphBrowser.TransferPhysicalSizeToPixelSize( deviceScreenSize, new Size { Width = int.Parse(GraphUtility.GetConfigurationValue("IPad2ScreenResolutionWidth")), Height = int.Parse(GraphUtility.GetConfigurationValue("IPad2ScreenResolutionHeight")) }, out windowSize); GraphBrowser.SetWindowSize(windowSize.Width, windowSize.Height); Assert.IsFalse(GraphUtility.IsInThisArticleDisplayed(), "On an iPad, in this article should not be displayed"); //Set as the screen size of IPhone6 plus deviceScreenSize = double.Parse(GraphUtility.GetConfigurationValue("IPhone6PlusSize")); //Since mobile phone width<Height, invert the output values GraphBrowser.TransferPhysicalSizeToPixelSize( deviceScreenSize, new Size { Width = int.Parse(GraphUtility.GetConfigurationValue("IPhone6PlusScreenResolutionWidth")), Height = int.Parse(GraphUtility.GetConfigurationValue("IPhone6PlusScreenResolutionHeight")) }, out windowSize); //Since mobile phone widh<height, invert height and width GraphBrowser.SetWindowSize(windowSize.Height, windowSize.Width); Assert.IsFalse(GraphUtility.IsInThisArticleDisplayed(), "On an iPhone, in this article should not be displayed"); }
public void Acceptance_Graph_S04_TC02_CanToggleArrowHideInLargeDocumentaionPage() { GraphPages.Navigation.Select("Documentation"); int currentWidth = 0; int currentHeight = 0; GraphBrowser.GetWindowSize(out currentWidth, out currentHeight); GraphBrowser.ZoomToPercent(50); if (GraphUtility.BrowserType == "IE32") { GraphBrowser.Wait(TimeSpan.FromSeconds(3)); } Assert.IsFalse( GraphUtility.IsToggleArrowDisplayed(), "An large window size ({0} x {1}) can make table of content arrow hide.", currentWidth, currentHeight); //Change the zoom level back GraphBrowser.ZoomToPercent(100); }
public void TestCleanup() { GraphBrowser.Goto(GraphBrowser.BaseAddress); GraphBrowser.ZoomToPercent(100); }