Пример #1
0
        public void Click_OnHtmlHyperlink_InTableWithEmptyCell_Succeeds()
        {
            // Arrange
            using (var webPage = new TempWebPage(
                       @"<html>
    <head>
        <title>test</title>
    </head>
    <body>
        <table id=""tableId"">
            <tr id=""row"">
                <td></td>
                <td><a href=""#"">Details</a></td>
            </tr>
        </table>
    </body>
</html>"))
            {
                var browserWindow = BrowserWindow.Launch(webPage.FilePath);
                var table         = browserWindow.Find <HtmlTable>(By.Id("tableId"));

                HtmlCell      cell      = table.GetCell(0, 1);
                HtmlHyperlink hyperlink = cell.Find <HtmlHyperlink>();

                // Act
                hyperlink.Click();

                // TODO: Assert
                browserWindow.Close();
            }
        }