PointAndClick for CUITe_HtmlTable

Sep 6, 2013 at 8:40 PM
Any one use PoinTAndClick method before for CUITe_HtmlTable? I was wondering how it works but I couldn't find anything on it.

Thanks

Jeff
Coordinator
Sep 9, 2013 at 6:56 AM
Hi Jeff,

Here is a sample test that asserts its functionality.
This test will basically click in the very center of the button.
[TestMethod]
        public void PointAndClick_OnHtmlInputButton_Succeeds()
        {
            //Arrange
            using (TempFile tempFile = new TempFile(
@"<html>
    <head>
        <title>test</title>
    </head>
    <body>
        <input type=""submit"" value=""Log In"" onclick=""alert('onclick');""/>
    </body>
</html>"))
            {
                CUITe_BrowserWindow.Launch(tempFile.FilePath);
                CUITe_BrowserWindow window = new CUITe_BrowserWindow("test");

                CUITe_HtmlInputButton button = window.Get<CUITe_HtmlInputButton>("Value=Log In");

                //Act
                button.PointAndClick();

                window.PerformDialogAction(BrowserDialogAction.Ok);

                window.Close();
            }
        }