public void ResizableItem_ResizeSides_ItemSidesResizedProperly() { var resizablePage = new ResizablePage(this.driver); // Get the current test method name (TestContext.CurrentContext.Test.Name = ResizableItem_ResizeSides_ItemSidesResizedProperly) and use it as a Key in the xlsx file InteractionPages resize = AccessExcelData.GetInteractionTestsData(TestContext.CurrentContext.Test.Name); // Get the tab number (e.g. "Default functionality", Constrain movement") from the test property above and give it to the URL resizablePage.tabNo = TestContext.CurrentContext.Test.Properties.Get("Resizable test tab Number:").ToString(); resizablePage.NavigateTo(resizablePage.URL); // Scroll page Up so the element is into view. Because when Firefox opens the desired page/tab, somehow the page is scrolled down ((IJavaScriptExecutor)driver).ExecuteScript("arguments[0].scrollIntoView(true);", resizablePage.TopOfPage); resizablePage.IncreaseWidthAndHeightBy2(int.Parse(resize.HorizontalOffset), int.Parse(resize.VerticalOffset)); // Exact Assert would not pass because the resized item's dimensions are 17 pixels less than logically expected // See method AssertSizeIncreasedWith2 for details resizablePage.AssertSizeIncreasedWith2(int.Parse(resize.HorizontalOffset), int.Parse(resize.VerticalOffset)); }