@@ -0,0 +1,963 @@
+import pytest%0Afrom tests.unit.fixtures import mock_commands_po as mock_po%0Afrom selenium.webdriver.common.keys import Keys%0A%0A%0Adef test_clear_method_delegates_to_webelement_and_returns_self(mock_po):%0A    mock_po.webelement.clear = lambda: None%0A    assert mock_po.clear() == mock_po%0A%0A%0Adef test_clear_method_does_not_invoke_pressing_enter_when_false(mock_po):%0A    mock_po.webelement.clear = lambda: None%0A    mock_po.enter_pressed = False%0A    def send_keys(key):%0A        mock_po.enter_pressed = True%0A    mock_po.webelement.send_keys = send_keys%0A    mock_po.clear(press_enter=False)%0A    assert mock_po.enter_pressed == False%0A%0A%0Adef test_clear_method_delegates_to_webelement_send_keys_if_press_enter(mock_po):%0A    mock_po.webelement.clear = lambda: None%0A    def send_keys(key):%0A        if key == Keys.ENTER:%0A            mock_po.enter_pressed = True%0A    mock_po.webelement.send_keys = send_keys%0A    mock_po.clear(press_enter=True)%0A    assert mock_po.enter_pressed == True%0A%0A

clear command unit tests