Skip to content

Commit f3d7062

Browse files
committed
[dotnet] fix flaky test
1 parent fc5509b commit f3d7062

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dotnet/test/common/PositionAndSizeTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Drawing;
23
using NUnit.Framework;
34
using OpenQA.Selenium.Environment;
@@ -136,7 +137,7 @@ public void ShouldHandleNonIntegerPositionAndSize()
136137

137138
IWebElement r2 = driver.FindElement(By.Id("r2"));
138139
string left = r2.GetCssValue("left");
139-
Assert.That(left, Does.StartWith("10.9"));
140+
Assert.AreEqual(Math.Round(Convert.ToDecimal(left.Replace("px", "")), 1), 10.9);
140141
string top = r2.GetCssValue("top");
141142
Assert.That(top, Does.StartWith("10.1"));
142143
Assert.AreEqual(new Point(11, 10), r2.Location);

0 commit comments

Comments
 (0)