Merge pull request #1383 from Kukks/fix-tests

fix e2e tests
This commit is contained in:
Nicolas Dorier
2020-03-12 00:53:44 +09:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -205,7 +205,8 @@ namespace BTCPayServer.Tests
IWebElement closebutton = null;
TestUtils.Eventually(() =>
{
var iframe = s.Driver.SwitchTo().Frame("btcpay");
var frameElement = s.Driver.FindElement(By.Name("btcpay"));
var iframe = s.Driver.SwitchTo().Frame(frameElement);
closebutton = iframe.FindElement(By.ClassName("close-action"));
Assert.True(closebutton.Displayed);
});

View File

@@ -88,6 +88,10 @@ namespace BTCPayServer.Tests
if (!webElement.Displayed)
return;
}
catch (NoSuchWindowException)
{
return;
}
catch (NoSuchElementException)
{
return;