public void ResizableDefault_WidthHeight_ShouldResize() { _resizePage.NavigateTo("http://demoqa.com/resizable/"); _resizePage.Resize(_resizePage.HandleObject, 300, 150); int width = _resizePage.ResizableObject.Size.Width; int height = _resizePage.ResizableObject.Size.Height; width.Should().Be(433); height.Should().Be(283); }
public void CheckResizeBy150W150HPixels() { //Arrange var resizable = new ResizablePage(_driver); //Act resizable.ResizeableLink.Click(); DelayForVideo(); resizable.Resize(resizable.ResizeDiagonal, 150, 150); DelayForVideo(); var resized = resizable.ResizeableItem.GetAttribute("style"); int w = resizable.ResizeableItem.Size.Width; int h = resizable.ResizeableItem.Size.Height; bool isInRange = ((w >= 282) && (w <= 284)) && ((h >= 282) && (h <= 284)); //Assert Assert.IsTrue(isInRange, "The width and/or height of the resized widget out of range 283 x 283 pixels (+-1 pixel)"); }