public void Execute_NoClearRequested_ClearNotCalled()
        {
            // Arrange
            var command    = new TypeCommand(DefaultText, DefaultSelector, false);
            var webDriver  = Substitute.For <IWebDriver>();
            var webElement = Substitute.For <IWebElement>();

            // Act
            IgnoreExceptions.Run(() => command.Execute(webDriver));

            // Assert
            webElement.DidNotReceive().Clear();
        }
        public void Execute_NoArgs_CallsSendKeys()
        {
            // Arrange
            var webDriver  = Substitute.For <IWebDriver>();
            var webElement = Substitute.For <IWebElement>();

            webDriver.FindElementBySelector(DefaultSelector).Returns(webElement);

            // Act
            IgnoreExceptions.Run(() => _defaultCommand.Execute(webDriver));

            // Assert
            webElement.Received().SendKeys(DefaultText);
        }
        public void Execute_ClearRequested_ClearCalled()
        {
            // Arrange
            var command    = new TypeCommand(DefaultText, DefaultSelector, true);
            var webDriver  = Substitute.For <IWebDriver>();
            var webElement = Substitute.For <IWebElement>();

            webDriver.FindElementBySelector(DefaultSelector).Returns(webElement);

            // Act
            IgnoreExceptions.Run(() => command.Execute(webDriver));

            // Assert
            webElement.Received().Clear();
        }