Skip to content

Commit

Permalink
[dotnet] fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Aug 27, 2023
1 parent fc5509b commit f3d7062
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dotnet/test/common/PositionAndSizeTest.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Drawing;
using NUnit.Framework;
using OpenQA.Selenium.Environment;
Expand Down Expand Up @@ -136,7 +137,7 @@ public void ShouldHandleNonIntegerPositionAndSize()

IWebElement r2 = driver.FindElement(By.Id("r2"));
string left = r2.GetCssValue("left");
Assert.That(left, Does.StartWith("10.9"));
Assert.AreEqual(Math.Round(Convert.ToDecimal(left.Replace("px", "")), 1), 10.9);
string top = r2.GetCssValue("top");
Assert.That(top, Does.StartWith("10.1"));
Assert.AreEqual(new Point(11, 10), r2.Location);
Expand Down

0 comments on commit f3d7062

Please sign in to comment.