Skip to content

Commit

Permalink
[dotnet] Adapting test to new W3C behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed May 19, 2023
1 parent 379dcab commit fb986f8
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions dotnet/test/common/ElementEqualityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,16 @@ public void SameElementLookedUpDifferentWaysUsingFindElementsShouldHaveSameHashC
}

[Test]
[IgnoreBrowser(Browser.Chrome, "https://bugs.chromium.org/p/chromedriver/issues/detail?id=4443")]
public void AnElementFoundInADifferentFrameViaJsShouldHaveSameId()
public void AnElementFoundInViaJsShouldHaveSameId()
{
driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("missedJsReference.html");

driver.SwitchTo().Frame("inner");
IWebElement first = driver.FindElement(By.Id("oneline"));

driver.SwitchTo().DefaultContent();
IWebElement element = (IWebElement)((IJavaScriptExecutor)driver).ExecuteScript("return frames[0].document.getElementById('oneline');");
IWebElement element = (IWebElement)((IJavaScriptExecutor)driver).ExecuteScript("return document.getElementById('oneline');");

driver.SwitchTo().Frame("inner");

IWebElement second = driver.FindElement(By.Id("oneline"));
Assert.AreEqual(first, element);
Assert.AreEqual(second, element);
}
}
}

0 comments on commit fb986f8

Please sign in to comment.